public class DataObjectPayload
extends java.lang.Object
Constructor and Description |
---|
DataObjectPayload(StoredTableSchema schema)
Creates a new DataobjectPayload linked to the specified persisted schema
|
Modifier and Type | Method and Description |
---|---|
void |
addField(DataObjectField field)
adds a field to this DataobjectPayload
|
void |
addProperty(DataObjectProperty property)
adds a property to this DataobjectPayload
|
void |
delete(QueryCondition condition)
performs a delete in the persistence layer
|
java.lang.String |
dropPayloadObjectList()
a list of elements in the object for logging purposes
|
DataObjectField |
getFieldAtIndex(int index) |
int |
getFieldNumber() |
DataObjectProperty |
getPropertyAtIndex(int index) |
int |
getPropertyNumber() |
void |
initFromDB(Row row,
TableAlias alias)
initiates this DataobjectPayload from the row of data
|
void |
insert() |
DataObjectProperty |
lookupPropertyOnName(java.lang.String name)
gets the property with the specified name
|
DataObjectField |
lookupSimpleFieldOnName(java.lang.String name)
gets the field with the specified name
|
static void |
massivedelete(DataObjectPayload[] payloads,
QueryCondition[] queryconditions)
Performs a massive delete in the databse
|
static void |
massiveinsert(DataObjectPayload[] payloads)
performs a massive insert of a series of payloads.
|
static void |
massiveupdate(DataObjectPayload[] payloads,
QueryCondition[] queryconditions)
Performs a massive update
|
void |
update(QueryCondition condition)
performs an update in the persistence layer
|
public DataObjectPayload(StoredTableSchema schema)
schema
- schema for this data object payloadpublic DataObjectProperty lookupPropertyOnName(java.lang.String name)
name
- namepublic DataObjectField lookupSimpleFieldOnName(java.lang.String name)
name
- namepublic int getFieldNumber()
public DataObjectField getFieldAtIndex(int index)
index
- and integer between 0 (included) and getFieldNumber (excluded)public int getPropertyNumber()
public DataObjectProperty getPropertyAtIndex(int index)
index
- and integer between 0 (included) and getPropertyNumber
(excluded)public void addField(DataObjectField field)
field
- the field addedpublic void addProperty(DataObjectProperty property)
property
- the property addedpublic void initFromDB(Row row, TableAlias alias)
row
- a row from the databsealias
- the alias to look atpublic void insert()
public static void massiveupdate(DataObjectPayload[] payloads, QueryCondition[] queryconditions)
payloads
- the payloads of objects to updatequeryconditions
- the query conditions for each object to ensure only
data entered is updatedpublic static void massivedelete(DataObjectPayload[] payloads, QueryCondition[] queryconditions)
payloads
- the array of payloads to deletequeryconditions
- query conditions for each payload (array has to be
same length as payload array)public static void massiveinsert(DataObjectPayload[] payloads)
payloads
- the array of payload.public void update(QueryCondition condition)
condition
- this method should be called with a query condition ensuring
that the correct rows are updatedpublic void delete(QueryCondition condition)
condition
- this method should be called with a query condition ensuring
that the correct rows are deletedpublic java.lang.String dropPayloadObjectList()