public class QuerySave
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
addInstance(int id,
Instance i)
Adds a new instance to be created or updated.
|
void |
addInstanceRO(int id,
Instance i)
Adds an instance to be referenced by other instances.
|
void |
addInstanceSet(int id,
InstanceSet is)
Adds a new InstanceSet to be created or updated
The instances will be created or updated in a case-per-case basis, depending on
whether the instance's primary key is null or not.
|
void |
addInstanceSetRO(int id,
InstanceSet iii)
Adds an instance set to be referenced by other instances.
|
void |
clear()
Adds a new instance to be created or updated.
|
CLBrowser |
getBrowser()
Getter for property browser.
|
void |
prepareStatements()
Set up the instance set to be saved.
|
void |
relateInstancesM2O(int[] id1,
int[] id2,
java.lang.String relationName)
Relates two instances or sets by id and relation name.
|
void |
relateInstancesM2O(int id1,
int id2,
java.lang.String relationName) |
void |
relateInstancesO2O(int[] id1,
int[] id2,
java.lang.String relationName)
Relates in a one-to-one basis each instance/set of id1[i] to each instance/set of id2[i].
|
void |
relateInstancesO2O(int id1,
int id2,
java.lang.String relationName) |
void |
relateInstancesOMS(int[] id1,
int[] id2,
java.lang.String relationName,
java.lang.String role1,
java.lang.String role2,
boolean forward)
Relates two instances or sets by id and relation name (which must be OMS-managed)
|
void |
relateInstancesOMS(int id1,
int id2,
java.lang.String relationName,
java.lang.String role1,
java.lang.String role2,
boolean forward) |
int |
save() |
void |
setBrowser(CLBrowser browser)
Setter for property browser.
|
void |
unrelateInstances(int srcBranchId,
int dstBranchId,
RelationVO rel) |
void |
unrelateInstances(int srcBranchId,
int dstBranchId,
java.lang.String relname) |
public QuerySave() throws QuerySaveException
QuerySaveException
public QuerySave(CLBrowser clb) throws QuerySaveException
QuerySaveException
public void clear()
id
- is the internal index of the instance to be saved, start
numbering schema at 0, then 1, 2, etc.i
- is the instance to be saved.public void addInstance(int id, Instance i) throws QuerySaveException
id
- is the internal index of the instance to be saved, start
numbering schema at 0, then 1, 2, etc.i
- is the instance to be saved.QuerySaveException
public void addInstanceRO(int id, Instance i) throws QuerySaveException
id
- is the internal index of the instance to be saved, start
numbering schema at 0, then 1, 2, etc.i
- is the instance to be saved.QuerySaveException
public void addInstanceSet(int id, InstanceSet is) throws QuerySaveException
id
- is the internal index of the instance to be saved, start
numbering schema at 0, then 1, 2, etc.is
- is the InstanceSet to be saved.QuerySaveException
public void addInstanceSetRO(int id, InstanceSet iii) throws QuerySaveException
id
- is the internal index of the instance to be saved, start
numbering schema at 0, then 1, 2, etc.iii
- is
- is the InstanceSet to be saved.QuerySaveException
public void relateInstancesO2O(int[] id1, int[] id2, java.lang.String relationName)
id1
- id2
- relationName
- public void relateInstancesO2O(int id1, int id2, java.lang.String relationName)
public void relateInstancesM2O(int[] id1, int[] id2, java.lang.String relationName)
QuerySave.relateInstancesO2O
.
If relation is One-to-Many, every instance/set of id1 will be related to all instances/sets on id2.
If relation is Many-to-One, every instance/set of id2 will be related to all instances/sets in id1.
If relation is Many-To-Many relationships, use QuerySave.relateInstancesOMS
.id1
- id2
- relationName
- public void relateInstancesM2O(int id1, int id2, java.lang.String relationName)
public void relateInstancesOMS(int[] id1, int[] id2, java.lang.String relationName, java.lang.String role1, java.lang.String role2, boolean forward)
id1
- id2
- relationName
- role1
- role2
- forward
- public void relateInstancesOMS(int id1, int id2, java.lang.String relationName, java.lang.String role1, java.lang.String role2, boolean forward)
public void unrelateInstances(int srcBranchId, int dstBranchId, java.lang.String relname)
public void unrelateInstances(int srcBranchId, int dstBranchId, RelationVO rel)
public void prepareStatements() throws QuerySaveException
QuerySaveException
public int save() throws QuerySaveException
QuerySaveException
public CLBrowser getBrowser()
public void setBrowser(CLBrowser browser)
browser
- New value of property browser.