Class MetisFieldPairedItem
java.lang.Object
io.github.tonywasher.joceanus.metis.field.MetisFieldPairedItem
- All Implemented Interfaces:
MetisDataItem.MetisDataObjectFormat,MetisFieldItem
Paired Item.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.tonywasher.joceanus.metis.field.MetisFieldItem
MetisFieldItem.MetisFieldDef, MetisFieldItem.MetisFieldItemType, MetisFieldItem.MetisFieldSetDef, MetisFieldItem.MetisFieldTableItem, MetisFieldItem.MetisFieldUpdatableItem, MetisFieldItem.MetisFieldVersionedDef -
Constructor Summary
ConstructorsConstructorDescriptionMetisFieldPairedItem(MetisFieldVersionedItem pParent, MetisFieldVersionedItem pChild, Long pExternalId) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleangetChild()Obtain the child.static intgetChildIdFromPairedId(Long pPairedId) Obtain the childId from the pairedId.Obtain the fieldSet.Obtain the id.static LonggetPairedIdFromParentAndChild(Integer pParentId, Integer pChildId) Obtain the pairedId from the parentId and childId.Obtain the parent.static intgetParentIdFromPairedId(Long pPairedId) Obtain the parentId from the pairedId.inthashCode()booleanreferencesId(Integer pId) Does this Item reference the supplied Id.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.github.tonywasher.joceanus.metis.data.MetisDataItem.MetisDataObjectFormat
formatObject
-
Constructor Details
-
MetisFieldPairedItem
public MetisFieldPairedItem(MetisFieldVersionedItem pParent, MetisFieldVersionedItem pChild, Long pExternalId) Constructor.- Parameters:
pParent- the parentpChild- the childpExternalId- the externalId
-
-
Method Details
-
getExternalId
Obtain the id.- Returns:
- the parent
-
referencesId
Does this Item reference the supplied Id.- Parameters:
pId- the id- Returns:
- true/false
-
getParent
Obtain the parent.- Returns:
- the parent
-
getParentIdFromPairedId
Obtain the parentId from the pairedId.- Parameters:
pPairedId- the paired Id- Returns:
- the parentId
-
getChild
Obtain the child.- Returns:
- the child
-
getChildIdFromPairedId
Obtain the childId from the pairedId.- Parameters:
pPairedId- the paired id- Returns:
- the childId
-
getPairedIdFromParentAndChild
Obtain the pairedId from the parentId and childId.- Parameters:
pParentId- the parent idpChildId- the childId- Returns:
- the pairedId
-
getDataFieldSet
Description copied from interface:MetisFieldItemObtain the fieldSet.- Specified by:
getDataFieldSetin interfaceMetisFieldItem- Returns:
- the fieldSet
-
toString
-
equals
-
hashCode
public int hashCode()
-