Package org.alfresco.repo.domain.node
Class ChildAssocEntity
java.lang.Object
org.alfresco.repo.domain.node.ChildAssocEntity
- All Implemented Interfaces:
Serializable
Bean for alf_child_assoc table.
- Since:
- 3.4
- Author:
- Derek Hulley
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetChildNameUnique(DictionaryService dictionaryService, QName assocTypeQName, String childName) Apply the cm:name to the child association.static LonggetChildNodeNameCrc(String childNodeName) Find a CRC value for the association's child node name using UTF-8 conversion.static StringgetChildNodeNameShort(String childNodeName) Truncates the association's child node name to 50 characters.getId()static LonggetQNameCrc(QName qname) Find a CRC value for the full QName using UTF-8 conversion.booleanvoidsetAssocIndex(int assocIndex) voidsetChildNode(NodeEntity childNode) voidsetChildNodeName(String childNodeName) Deprecated.For persistence usevoidsetChildNodeNameAll(DictionaryService dictionaryService, QName typeQName, String childNodeName) Helper method to set all values associated with thechild node name.voidsetChildNodeNameCrc(Long childNodeNameCrc) Deprecated.For persistence usevoidsetChildNodeNameCrcs(List<Long> childNodeNameCrcs) voidsetChildNodeTypeQNameIds(List<Long> childNodeTypeQNameIds) voidvoidsetOrdered(boolean ordered) voidsetParentNode(NodeEntity parentNode) voidsetPrimary(Boolean isPrimary) booleansetQNameAll(QNameDAO qnameDAO, QName qname, boolean forUpdate) Set all required fields associated with the patchQName.voidsetQnameCrc(Long qnameCrc) Deprecated.For persistence usevoidsetQnameLocalName(String qnameLocalName) Deprecated.For persistence usevoidsetQnameNamespaceId(Long qnameNamespaceId) Deprecated.For persistence usevoidsetSameStore(Boolean sameStore) booleansetTypeQNameAll(QNameDAO qnameDAO, QName typeQName, boolean forUpdate) Helper method to set thesetTypeQNameId(Long).voidsetTypeQNameId(Long typeQNameId) Deprecated.For persistence use onlyvoidsetTypeQNameIds(List<Long> typeQNameIds) voidsetVersion(Long version) toString()
-
Constructor Details
-
ChildAssocEntity
public ChildAssocEntity()Required default constructor
-
-
Method Details
-
getQNameCrc
Find a CRC value for the full QName using UTF-8 conversion.- Parameters:
qname- the association qname- Returns:
- Returns the CRC value (UTF-8 compatible)
-
getChildNodeNameCrc
Find a CRC value for the association's child node name using UTF-8 conversion.- Parameters:
childNodeName- the child node name- Returns:
- Returns the CRC value (UTF-8 compatible)
-
getChildNodeNameShort
Truncates the association's child node name to 50 characters.- Parameters:
childNodeName- the child node name- Returns:
- Returns the potentially truncated value
-
getChildNameUnique
public static Pair<String,Long> getChildNameUnique(DictionaryService dictionaryService, QName assocTypeQName, String childName) Apply the cm:name to the child association. If the child name is null then a GUID is generated as a substitute.Unknown associations or associations that do not require unique name checking will use a GUID for the child name and the CRC value used will be negative.
- Parameters:
childName- the cm:name applying to the association.
-
toString
-
getRef
-
getPair
-
getId
-
setId
-
getVersion
-
setVersion
-
getParentNode
-
setParentNode
-
getChildNode
-
setChildNode
-
setTypeQNameAll
Helper method to set thesetTypeQNameId(Long).- Parameters:
qnameDAO- the DAO to resolve the QName IDtypeQName- the association typeforUpdate- true if the QName must exist i.e. this entity will be used for updates and the typeQNamemust exist.- Returns:
- true if the set worked otherwise false
-
getTypeQNameId
-
setTypeQNameId
Deprecated.For persistence use only -
setChildNodeNameAll
public void setChildNodeNameAll(DictionaryService dictionaryService, QName typeQName, String childNodeName) Helper method to set all values associated with thechild node name.- Parameters:
dictionaryService- the service that determines how the CRC values are generated. If this is null then the CRC values are generated assuming that positive enforcement of the name constraint is required.childNodeName- the child node name
-
getChildNodeNameCrc
-
setChildNodeNameCrc
Deprecated.For persistence use -
getChildNodeName
-
setChildNodeName
Deprecated.For persistence use -
setQNameAll
Set all required fields associated with the patchQName.- Parameters:
forUpdate- true if the entity is going to be used for a data update i.e. theQNamemust exist.- Returns:
- Returns true if the
QNamenamespace exists.
-
getQnameNamespaceId
-
setQnameNamespaceId
Deprecated.For persistence use -
getQnameLocalName
-
setQnameLocalName
Deprecated.For persistence use -
getQnameCrc
-
setQnameCrc
Deprecated.For persistence use -
isPrimary
-
setPrimary
-
getAssocIndex
public int getAssocIndex() -
setAssocIndex
public void setAssocIndex(int assocIndex) -
getTypeQNameIds
-
setTypeQNameIds
-
getChildNodeNameCrcs
-
setChildNodeNameCrcs
-
getChildNodeTypeQNameIds
-
setChildNodeTypeQNameIds
-
getSameStore
-
setSameStore
-
isOrdered
public boolean isOrdered() -
setOrdered
public void setOrdered(boolean ordered)
-