E
- this data objectF
- the data object of the parent for linkedToParent relationshippublic class Linkedtoparent<E extends DataObject<E> & UniqueidentifiedInterface<E>,F extends DataObject<F>> extends DataObjectProperty<E>
updatedfieldingui
definition, field, parentpayload
Constructor and Description |
---|
Linkedtoparent(LinkedtoparentDefinition<E,F> definition,
DataObjectPayload parentpayload,
DataObjectDefinition<F> parentdefinition)
Creates a LinkedToParent property for this object
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
generateUpdateNote(E object,
DataObjectId<F> oldparentid,
DataObjectId<F> newparentid)
generates an update note when changing parent if object is iterated, with as
much information from the parent as possible (i.e.
|
DataObjectId<F> |
getId()
gets the id of the parent object
|
DataObjectId<Domain> |
getLinkedtoparentlocationdomainid()
gets the domain id of the parent if it exists
|
java.lang.String |
getLinkedtoparentnr()
gest the number of the parent if it exists)
|
java.lang.String |
getLinkedtoparentobjectname()
gets the name of the parent (if it exists)
|
F |
getparent(E object)
gets the parent object if set
|
void |
preprocStoredobjectInsert(E object)
performs pre-processing of the object before insert.
|
static <E extends DataObject<E> & UniqueidentifiedInterface<E>,F extends DataObject<F> & UniqueidentifiedInterface<F>> |
preprocStoredobjectInsert(E[] objectbatch,
Linkedtoparent<E,F>[] linkedtoparentbatch)
massive version of the pre-processing before insert
|
void |
setDependentPropertyUniqueidentified(Uniqueidentified<E> uniqueidentified)
sets the dependent property unique identified
|
void |
setparent(E object,
DataObjectId<F> parentid)
sets the parent for the object.
|
void |
setparentwithoutupdate(E object,
DataObjectId<F> parentid)
sets the parent without performing an update
|
protected void |
setPrid(DataObjectId<F> prid)
sets the id of the parent
|
generateSimpleDataEltFromObject, getDisplayDataElt, getDynamicDataElt, getFieldBufferForGUI
getAllTriggersForRefresh, getFieldFromName, getFieldNumber, getStoredField, getTriggersForThisUpdate, initFromDB, postTreatmentAfterInitFromDB
changeName, cleanName, equals, getName
public Linkedtoparent(LinkedtoparentDefinition<E,F> definition, DataObjectPayload parentpayload, DataObjectDefinition<F> parentdefinition)
definition
- definition of the linked to parentparentpayload
- payload of the current data objectparentdefinition
- definition of the parent data object for
LinkedToParent relationshippublic void preprocStoredobjectInsert(E object)
object
- parent data objectpublic static <E extends DataObject<E> & UniqueidentifiedInterface<E>,F extends DataObject<F> & UniqueidentifiedInterface<F>> void preprocStoredobjectInsert(E[] objectbatch, Linkedtoparent<E,F>[] linkedtoparentbatch)
objectbatch
- batch of objectlinkedtoparentbatch
- corresponding batch of linkedtoparent propertiesprotected void setPrid(DataObjectId<F> prid)
prid
- id dof the parentpublic DataObjectId<F> getId()
public java.lang.String generateUpdateNote(E object, DataObjectId<F> oldparentid, DataObjectId<F> newparentid)
object
- current objectoldparentid
- old parent idnewparentid
- new parent idpublic void setparent(E object, DataObjectId<F> parentid)
object
- objectparentid
- if of the parent to set.public F getparent(E object)
object
- current objectpublic java.lang.String getLinkedtoparentobjectname()
public java.lang.String getLinkedtoparentnr()
public DataObjectId<Domain> getLinkedtoparentlocationdomainid()
public void setDependentPropertyUniqueidentified(Uniqueidentified<E> uniqueidentified)
uniqueidentified
- dependent property unique identifiedpublic void setparentwithoutupdate(E object, DataObjectId<F> parentid)
object
- data objectparentid
- parent id