{"id":21719998,"url":"https://github.com/ext/dbobject","last_synced_at":"2025-10-08T13:45:01.134Z","repository":{"id":1333153,"uuid":"1278928","full_name":"ext/dbobject","owner":"ext","description":"Simple SQL ORM for Java","archived":false,"fork":false,"pushed_at":"2011-01-21T17:18:06.000Z","size":132,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-06T10:44:47.668Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ext.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-01-21T16:08:52.000Z","updated_at":"2012-12-17T19:34:40.000Z","dependencies_parsed_at":"2022-07-29T08:10:00.407Z","dependency_job_id":null,"html_url":"https://github.com/ext/dbobject","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ext/dbobject","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ext%2Fdbobject","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ext%2Fdbobject/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ext%2Fdbobject/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ext%2Fdbobject/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ext","download_url":"https://codeload.github.com/ext/dbobject/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ext%2Fdbobject/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278955858,"owners_count":26075220,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-26T01:46:30.311Z","updated_at":"2025-10-08T13:45:01.113Z","avatar_url":"https://github.com/ext.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Simple SQL ORM for Java\n=======================\n\nNot the most efficient as it makes more queries than needed, quite easy to\noptimize if needed. I initially write it as a simple abstraction for a single\ntable, but started reusing it more and more so I decided to upload it here.\n\nSample\n------\n\n\tpublic class Party extends DBObject implements se.bth.libsla.Party {\n\t\tprivate static DBObjectState query;\n\t       \n\t\tprivate @Column(\"id\") int _id;\n\t\tprivate @Column(\"sla_id\")    @References(SLA.class)  SLA _sla;\n\t\tprivate @Column(\"role_id\")   @References(Role.class) Role _role;\n\t\tprivate @Column(\"peer_data\") @Serializes(Peer.class) Peer _peer;\n\t\tprivate @Column(\"signed\") int _signed;\n\t\n\t\tstatic public void initialize_queries(DataLayer db) throws Exception {\n\t\t       query = initialize(Party.class, db, \"party\");\n\t\t}\n\n\t\t/* ... */\n\t}\n\nDocumentation\n-------------\n\n1. First create your own class, represented by a table in the database.\n2. Add a static initialization function and call it before creating any\n   instances, preferably at the same place where the database connection is\n   made.\n3. For each column you want represented add the @Column annotation where the\n   value is the column name.\n   - If you have foreign keys you can add @References to create an instance of\n     another class.\n   - For serialized data use @Serializes\n   - SQL enumeration can either be a String, Integer or int.\n4. To store changes use the inherited persist() method. If the object was loaded\n   from database it will be updated, otherwise it will be inserted.\n5. To query rows use the selection() method with criteria.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fext%2Fdbobject","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fext%2Fdbobject","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fext%2Fdbobject/lists"}