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:
  • Constructor Details

    • ChildAssocEntity

      public ChildAssocEntity()
      Required default constructor
  • Method Details

    • getQNameCrc

      public static Long getQNameCrc(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 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

      public String toString()
      Overrides:
      toString in class Object
    • getRef

      public ChildAssociationRef getRef(QNameDAO qnameDAO)
    • getPair

      public Pair<Long,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, QName typeQName, boolean forUpdate)
      Helper method to set the setTypeQNameId(Long).
      Parameters:
      qnameDAO - the DAO to resolve the QName ID
      typeQName - the association type
      forUpdate - true if the QName must exist i.e. this entity will be used for updates and the type QName must 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(DictionaryService dictionaryService, QName typeQName, String childNodeName)
      Helper method to set all values associated with the child 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, QName qname, boolean forUpdate)
      Set all required fields associated with the patch QName.
      Parameters:
      forUpdate - true if the entity is going to be used for a data update i.e. the QName must exist.
      Returns:
      Returns true if the QName namespace 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)
    • getTypeQNameIds

      public List<Long> getTypeQNameIds()
    • setTypeQNameIds

      public void setTypeQNameIds(List<Long> typeQNameIds)
    • getChildNodeNameCrcs

      public List<Long> getChildNodeNameCrcs()
    • setChildNodeNameCrcs

      public void setChildNodeNameCrcs(List<Long> childNodeNameCrcs)
    • getChildNodeTypeQNameIds

      public List<Long> getChildNodeTypeQNameIds()
    • setChildNodeTypeQNameIds

      public void setChildNodeTypeQNameIds(List<Long> childNodeTypeQNameIds)
    • getSameStore

      public Boolean getSameStore()
    • setSameStore

      public void setSameStore(Boolean sameStore)
    • isOrdered

      public boolean isOrdered()
    • setOrdered

      public void setOrdered(boolean ordered)