Class AttributeFactory

    • Constructor Detail

    • Method Detail

      • buildAttribute

        public <X,​Y> PersistentAttribute<X,​Y> buildAttribute​(ManagedDomainType<X> ownerType,
                                                                         Property property)
        Build a normal attribute.
        Type Parameters:
        X - The type of the owner
        Y - The attribute type
        Parameters:
        ownerType - The descriptor of the attribute owner (aka declarer).
        property - The Hibernate property descriptor for the attribute
        Returns:
        The built attribute descriptor or null if the attribute is not part of the JPA 2 model (eg backrefs)
      • buildIdAttribute

        public <X,​Y> SingularPersistentAttribute<X,​Y> buildIdAttribute​(IdentifiableDomainType<X> ownerType,
                                                                                   Property property)
        Build the identifier attribute descriptor
        Type Parameters:
        X - The type of the owner
        Y - The attribute type
        Parameters:
        ownerType - The descriptor of the attribute owner (aka declarer).
        property - The Hibernate property descriptor for the identifier attribute
        Returns:
        The built attribute descriptor
      • buildVersionAttribute

        public <X,​Y> SingularAttributeImpl<X,​Y> buildVersionAttribute​(IdentifiableDomainType<X> ownerType,
                                                                                  Property property)
        Build the version attribute descriptor
        Type Parameters:
        X - The type of the owner
        Y - The attribute type
        Parameters:
        ownerType - The descriptor of the attribute owner (aka declarer).
        property - The Hibernate property descriptor for the version attribute
        Returns:
        The built attribute descriptor
      • determineSingularAssociationClassification

        public static AttributeClassification determineSingularAssociationClassification​(Member member)
      • isManyToMany

        public static boolean isManyToMany​(Member member)