Class LcEntityTypeInfo


  • public class LcEntityTypeInfo
    extends Object
    • Method Detail

      • getStateField

        public Field getStateField()
      • getForeignTableFieldForJoinKey

        @Nullable
        public Field getForeignTableFieldForJoinKey​(String joinKey,
                                                    Class<?> targetType)
        Return the foreign table field having the given join key.
        Parameters:
        joinKey - join key
        targetType - type of target entity
        Returns:
        the field
      • getRequiredForeignTableFieldForJoinKey

        public Field getRequiredForeignTableFieldForJoinKey​(String joinKey,
                                                            Class<?> targetType)
        Return the foreign table field having the given join key.
        Parameters:
        joinKey - join key
        targetType - type of target entity
        Returns:
        the field
      • getForeignTableWithFieldForJoinKey

        @Nullable
        public LcEntityTypeInfo.ForeignTableInfo getForeignTableWithFieldForJoinKey​(String joinKey,
                                                                                    Class<?> targetType)
        Return the foreign table field having the given join key.
        Parameters:
        joinKey - join key
        targetType - type of target entity
        Returns:
        the field and the foreign table annotation
      • getRequiredForeignTableWithFieldForJoinKey

        public LcEntityTypeInfo.ForeignTableInfo getRequiredForeignTableWithFieldForJoinKey​(String joinKey,
                                                                                            Class<?> targetType)
        Return the foreign table field having the given join key.
        Parameters:
        joinKey - join key
        targetType - type of target entity
        Returns:
        the field and the foreign table annotation
      • getForeignTableFieldForProperty

        @Nullable
        public Field getForeignTableFieldForProperty​(String propertyName)
        Return the foreign table field on the given property.
        Parameters:
        propertyName - foreign table property
        Returns:
        the field
      • getRequiredForeignTableFieldForProperty

        public Field getRequiredForeignTableFieldForProperty​(String propertyName)
        Return the foreign table field on the given property.
        Parameters:
        propertyName - foreign table property
        Returns:
        the field
      • getForeignTableForProperty

        @Nullable
        public ForeignTable getForeignTableForProperty​(String propertyName)
        Return the foreign table field on the given property.
        Parameters:
        propertyName - foreign table property
        Returns:
        the foreign table annotation
      • getRequiredForeignTableForProperty

        public ForeignTable getRequiredForeignTableForProperty​(String propertyName)
        Return the foreign table field on the given property.
        Parameters:
        propertyName - foreign table property
        Returns:
        the foreign table annotation
      • isForeignTableField

        public static boolean isForeignTableField​(Field field)
        Return true if the given field is associated to a @ForeignTable annotation.
        Parameters:
        field - field
        Returns:
        true if it is a foreign table
      • getJoinTable

        @Nullable
        public LcEntityTypeInfo.JoinTableInfo getJoinTable​(String propertyName)
        Return join table information on the given property name.
        Parameters:
        propertyName - property
        Returns:
        join table info
      • getJoinTableElementsForJoinTableClass

        public <T> Collection<T> getJoinTableElementsForJoinTableClass​(Object instance,
                                                                       Class<T> joinTableClass)