{"id":20372744,"url":"https://github.com/sidmishraw/simpleestore","last_synced_at":"2025-03-04T20:42:53.650Z","repository":{"id":86400716,"uuid":"96658832","full_name":"sidmishraw/simpleestore","owner":"sidmishraw","description":"Simple EStore simulation for objects as states","archived":false,"fork":false,"pushed_at":"2017-07-09T03:31:15.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-15T06:48:04.711Z","etag":null,"topics":["java8","states-as-object"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sidmishraw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-09T03:30:00.000Z","updated_at":"2017-07-09T03:31:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"4d170416-db67-453c-bb25-64a55dd5758d","html_url":"https://github.com/sidmishraw/simpleestore","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidmishraw%2Fsimpleestore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidmishraw%2Fsimpleestore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidmishraw%2Fsimpleestore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidmishraw%2Fsimpleestore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sidmishraw","download_url":"https://codeload.github.com/sidmishraw/simpleestore/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241921840,"owners_count":20042763,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java8","states-as-object"],"created_at":"2024-11-15T01:14:45.716Z","updated_at":"2025-03-04T20:42:53.643Z","avatar_url":"https://github.com/sidmishraw.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **EStore**\n----\n\n**Author**: Sidharth Mishra\n\n**Version**: 0.0.1\n\n----\n\u003e Note: All objects made explicitly by me are `Value` objects. These include `Customer`, `ShoppingCart`, `Item`, `CartState`, `EStore` and `EStoreDriver`.\n\n\u003e Note: This project too follows similar restrictions as `FJava` but not that strictly. The variables are not `active`.\n\n\n## Briefing:\nIn this example, **EStore** is an **e-store** maintaining a large collection of shopping carts.\n\nEach shopping cart has a customer, contains items and has a status: `BOOKED`, `PURCHASED`, `SHIPPED`.\n\nThe items can be added and removed to/from the shopping cart.\n\nThe `EStore` maintains a hash-map indexed by the shopping carts. Each cart is associated with its state.\n\nEach time the state of the cart changes (items are added/removed, status changes) the old binding is deleted and a new binding is created that associates the same cart to the new state.\n\n## Class Summary:\nThe project has the following classes:\n* **Customer**: This is the customer. It is a `value` object.\n\n* **Item**: This is an item. It is a `value` object.\n\n* **CartStatus**: This is all the possible statuses of the shopping cart. It is an enum with values `BOOKED`, `PURCHASED`, `SHIPPED`\n\n* **ShoppingCart**: This is the shopping cart. It has a `cartId` and `customer`. It is a `value` object. Used as the key in the hash map called `shoppingCarts` in `EStore.java`. The hashmap is a mapping between the shopping cart and its state.\n\n* **CartState**: This represents the cart's state. The state of a cart is defined as the list of items it holds and it's status. This is a `value` object.\n\n* **EStore**: This represents the e-store. It has the hashmap holding the mapping from the `ShoppingCart` to the `CartState`. It also exposes the `makeCart`, `addItem`, `removeItem` and `changeStatus` functionalities.\n\n* **EStoreDriver**: This is the main driver code. It is the running example of this concept.\n\n### Tools:\n* Java -- JDK v1.8.0_131\n* Eclipse Neon.3 v4.6.3","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsidmishraw%2Fsimpleestore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsidmishraw%2Fsimpleestore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsidmishraw%2Fsimpleestore/lists"}