Package org.alfresco.repo.domain.node
Class ChildAssocEntity
- java.lang.Object
-
- org.alfresco.repo.domain.node.ChildAssocEntity
-
- All Implemented Interfaces:
Serializable
public class ChildAssocEntity extends Object implements Serializable
Bean for alf_child_assoc table.- Since:
- 3.4
- Author:
- Derek Hulley
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ChildAssocEntity()Required default constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intgetAssocIndex()static org.alfresco.util.Pair<String,Long>getChildNameUnique(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService, org.alfresco.service.namespace.QName assocTypeQName, String childName)Apply the cm:name to the child association.NodeEntitygetChildNode()StringgetChildNodeName()LonggetChildNodeNameCrc()static LonggetChildNodeNameCrc(String childNodeName)Find a CRC value for the association's child node name using UTF-8 conversion.List<Long>getChildNodeNameCrcs()static StringgetChildNodeNameShort(String childNodeName)Truncates the association's child node name to 50 characters.List<Long>getChildNodeTypeQNameIds()LonggetId()org.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.ChildAssociationRef>getPair(QNameDAO qnameDAO)NodeEntitygetParentNode()LonggetQnameCrc()static LonggetQNameCrc(org.alfresco.service.namespace.QName qname)Find a CRC value for the full QName using UTF-8 conversion.StringgetQnameLocalName()LonggetQnameNamespaceId()org.alfresco.service.cmr.repository.ChildAssociationRefgetRef(QNameDAO qnameDAO)BooleangetSameStore()LonggetTypeQNameId()List<Long>getTypeQNameIds()LonggetVersion()booleanisOrdered()BooleanisPrimary()voidsetAssocIndex(int assocIndex)voidsetChildNode(NodeEntity childNode)voidsetChildNodeName(String childNodeName)Deprecated.For persistence usevoidsetChildNodeNameAll(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService, org.alfresco.service.namespace.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)voidsetId(Long id)voidsetOrdered(boolean ordered)voidsetParentNode(NodeEntity parentNode)voidsetPrimary(Boolean isPrimary)booleansetQNameAll(QNameDAO qnameDAO, org.alfresco.service.namespace.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, org.alfresco.service.namespace.QName typeQName, boolean forUpdate)Helper method to set thesetTypeQNameId(Long).voidsetTypeQNameId(Long typeQNameId)Deprecated.For persistence use onlyvoidsetTypeQNameIds(List<Long> typeQNameIds)voidsetVersion(Long version)StringtoString()
-
-
-
Method Detail
-
getQNameCrc
public static Long getQNameCrc(org.alfresco.service.namespace.QName qname)
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
public static Long getChildNodeNameCrc(String childNodeName)
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
public static String getChildNodeNameShort(String childNodeName)
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 org.alfresco.util.Pair<String,Long> getChildNameUnique(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService, org.alfresco.service.namespace.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.
-
getRef
public org.alfresco.service.cmr.repository.ChildAssociationRef getRef(QNameDAO qnameDAO)
-
getPair
public org.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.ChildAssociationRef> getPair(QNameDAO qnameDAO)
-
getId
public Long getId()
-
setId
public void setId(Long id)
-
getVersion
public Long getVersion()
-
setVersion
public void setVersion(Long version)
-
getParentNode
public NodeEntity getParentNode()
-
setParentNode
public void setParentNode(NodeEntity parentNode)
-
getChildNode
public NodeEntity getChildNode()
-
setChildNode
public void setChildNode(NodeEntity childNode)
-
setTypeQNameAll
public boolean setTypeQNameAll(QNameDAO qnameDAO, org.alfresco.service.namespace.QName typeQName, boolean forUpdate)
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
public Long getTypeQNameId()
-
setTypeQNameId
public void setTypeQNameId(Long typeQNameId)
Deprecated.For persistence use only
-
setChildNodeNameAll
public void setChildNodeNameAll(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService, org.alfresco.service.namespace.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
public Long getChildNodeNameCrc()
-
setChildNodeNameCrc
public void setChildNodeNameCrc(Long childNodeNameCrc)
Deprecated.For persistence use
-
getChildNodeName
public String getChildNodeName()
-
setChildNodeName
public void setChildNodeName(String childNodeName)
Deprecated.For persistence use
-
setQNameAll
public boolean setQNameAll(QNameDAO qnameDAO, org.alfresco.service.namespace.QName qname, boolean forUpdate)
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
public Long getQnameNamespaceId()
-
setQnameNamespaceId
public void setQnameNamespaceId(Long qnameNamespaceId)
Deprecated.For persistence use
-
getQnameLocalName
public String getQnameLocalName()
-
setQnameLocalName
public void setQnameLocalName(String qnameLocalName)
Deprecated.For persistence use
-
getQnameCrc
public Long getQnameCrc()
-
setQnameCrc
public void setQnameCrc(Long qnameCrc)
Deprecated.For persistence use
-
isPrimary
public Boolean isPrimary()
-
setPrimary
public void setPrimary(Boolean isPrimary)
-
getAssocIndex
public int getAssocIndex()
-
setAssocIndex
public void setAssocIndex(int assocIndex)
-
getSameStore
public Boolean getSameStore()
-
setSameStore
public void setSameStore(Boolean sameStore)
-
isOrdered
public boolean isOrdered()
-
setOrdered
public void setOrdered(boolean ordered)
-
-