Class ChildAssocEntity

  • All Implemented Interfaces:
    java.io.Serializable

    public class ChildAssocEntity
    extends java.lang.Object
    implements java.io.Serializable
    Bean for alf_child_assoc table.
    Since:
    3.4
    Author:
    Derek Hulley
    See Also:
    Serialized Form
    • Constructor Detail

      • ChildAssocEntity

        public ChildAssocEntity()
        Required default constructor
    • Method Detail

      • getQNameCrc

        public static java.lang.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 java.lang.Long getChildNodeNameCrc​(java.lang.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 java.lang.String getChildNodeNameShort​(java.lang.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<java.lang.String,​java.lang.Long> getChildNameUnique​(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService,
                                                                                                       org.alfresco.service.namespace.QName assocTypeQName,
                                                                                                       java.lang.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 java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getRef

        public org.alfresco.service.cmr.repository.ChildAssociationRef getRef​(QNameDAO qnameDAO)
      • getPair

        public org.alfresco.util.Pair<java.lang.Long,​org.alfresco.service.cmr.repository.ChildAssociationRef> getPair​(QNameDAO qnameDAO)
      • getId

        public java.lang.Long getId()
      • setId

        public void setId​(java.lang.Long id)
      • getVersion

        public java.lang.Long getVersion()
      • setVersion

        public void setVersion​(java.lang.Long version)
      • getParentNode

        public NodeEntity getParentNode()
      • setParentNode

        public void setParentNode​(NodeEntity parentNode)
      • setChildNode

        public void setChildNode​(NodeEntity childNode)
      • setTypeQNameAll

        public boolean setTypeQNameAll​(QNameDAO qnameDAO,
                                       org.alfresco.service.namespace.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 java.lang.Long getTypeQNameId()
      • setTypeQNameId

        public void setTypeQNameId​(java.lang.Long typeQNameId)
        Deprecated.
        For persistence use only
      • setChildNodeNameAll

        public void setChildNodeNameAll​(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService,
                                        org.alfresco.service.namespace.QName typeQName,
                                        java.lang.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 java.lang.Long getChildNodeNameCrc()
      • setChildNodeNameCrc

        public void setChildNodeNameCrc​(java.lang.Long childNodeNameCrc)
        Deprecated.
        For persistence use
      • getChildNodeName

        public java.lang.String getChildNodeName()
      • setChildNodeName

        public void setChildNodeName​(java.lang.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 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 java.lang.Long getQnameNamespaceId()
      • setQnameNamespaceId

        public void setQnameNamespaceId​(java.lang.Long qnameNamespaceId)
        Deprecated.
        For persistence use
      • getQnameLocalName

        public java.lang.String getQnameLocalName()
      • setQnameLocalName

        public void setQnameLocalName​(java.lang.String qnameLocalName)
        Deprecated.
        For persistence use
      • getQnameCrc

        public java.lang.Long getQnameCrc()
      • setQnameCrc

        public void setQnameCrc​(java.lang.Long qnameCrc)
        Deprecated.
        For persistence use
      • isPrimary

        public java.lang.Boolean isPrimary()
      • setPrimary

        public void setPrimary​(java.lang.Boolean isPrimary)
      • getAssocIndex

        public int getAssocIndex()
      • setAssocIndex

        public void setAssocIndex​(int assocIndex)
      • getTypeQNameIds

        public java.util.List<java.lang.Long> getTypeQNameIds()
      • setTypeQNameIds

        public void setTypeQNameIds​(java.util.List<java.lang.Long> typeQNameIds)
      • getChildNodeNameCrcs

        public java.util.List<java.lang.Long> getChildNodeNameCrcs()
      • setChildNodeNameCrcs

        public void setChildNodeNameCrcs​(java.util.List<java.lang.Long> childNodeNameCrcs)
      • getChildNodeTypeQNameIds

        public java.util.List<java.lang.Long> getChildNodeTypeQNameIds()
      • setChildNodeTypeQNameIds

        public void setChildNodeTypeQNameIds​(java.util.List<java.lang.Long> childNodeTypeQNameIds)
      • getSameStore

        public java.lang.Boolean getSameStore()
      • setSameStore

        public void setSameStore​(java.lang.Boolean sameStore)
      • isOrdered

        public boolean isOrdered()
      • setOrdered

        public void setOrdered​(boolean ordered)