public abstract class SyntityMeta extends SemanticTableMeta
Modifier and Type | Field and Description |
---|---|
String |
domain
exposed to subclass to change
|
static String |
err_requires_synuid |
String |
synoder
Entity creator's id used for identify originators in domain (globally?)
|
String |
synuid |
protected HashSet<String> |
uids
Entity's columns for generation global uid
|
Constructor and Description |
---|
SyntityMeta(String tbl,
String pk,
String domain,
String nodeid,
String conn) |
Modifier and Type | Method and Description |
---|---|
boolean |
autopk() |
SyntityMeta |
autopk(boolean ak) |
String[] |
entCols()
Generate columns for inserting challenging entities.
|
HashSet<String> |
globalIds() |
ArrayList<Object[]> |
insertChallengeEnt(String uids,
AnResultset challents)
Generate data for value clause of the Insert statement,
using columns for filter out fields of entity table.
|
abstract Object[] |
insertSelectItems(SynChangeMeta chgm,
String entid,
AnResultset entities,
AnResultset changes)
Generate select-items for select clause which is used for Insert, e.g.
|
<T extends SemanticTableMeta> |
replace()
Explicitly call this after this meta with semantics is created,
to replace auto found meta from database, which is managed by
Connects . |
ArrayList<Object[]> |
updateEntNvs(SynChangeMeta chgm,
String entid,
AnResultset entities,
AnResultset challenges)
Generate set values for the Update statement which is used for updating current entity, e.g.
|
public static final String err_requires_synuid
public final String domain
public final String synuid
public String synoder
public boolean autopk()
public SyntityMeta autopk(boolean ak)
public <T extends SemanticTableMeta> T replace() throws io.odysz.transact.x.TransException, SQLException
SemanticTableMeta
Connects
.replace
in class SemanticTableMeta
io.odysz.transact.x.TransException
SQLException
public HashSet<String> globalIds() throws SemanticException
SemanticException
public String[] entCols() throws SemanticException
This method will ignore auto-key field
SemanticException
- this instance is not initialized from db (TableMeta.ftypes
is empty).public ArrayList<Object[]> insertChallengeEnt(String uids, AnResultset challents) throws SQLException, SemanticException
entCols()
.
SQLException
SemanticException
public ArrayList<Object[]> updateEntNvs(SynChangeMeta chgm, String entid, AnResultset entities, AnResultset challenges) throws SemanticException, SQLException
update t set c = v1, ...before
insert into t select 'item-a', 'item-b' where not exists select 1 from t where condition-avoiding-duplicateorg
entid
- entities
- challenges
- Update.nvs(ArrayList)
SQLException
SemanticException
public abstract Object[] insertSelectItems(SynChangeMeta chgm, String entid, AnResultset entities, AnResultset changes) throws io.odysz.transact.x.TransException, SQLException
insert into t select 'item-a', 'item-b' where not exists select 1 from t where condition-avoiding-duplicate
entid
- entities
- changes
- SQLException
io.odysz.transact.x.TransException
Copyright © 2024. All rights reserved.