Class FieldModule


  • public class FieldModule
    extends java.lang.Object
    A helper module for getting fields from classes.
    Author:
    Collin Alpert
    • Method Summary

      Modifier and Type Method Description
      java.util.List<TableColumnReference> getAllFields​(java.lang.Class<? extends BaseEntity> instanceClass)
      Gets all the fields and the fields of foreign key objects in this entity.
      java.util.List<java.lang.reflect.Field> getEntityFields​(java.lang.Class<? extends BaseEntity> instanceClass)  
      java.util.List<java.lang.reflect.Field> getEntityFields​(java.lang.Class<? extends BaseEntity> instanceClass, boolean includeForeignKeys)  
      java.util.List<java.lang.reflect.Field> getEntityFields​(java.lang.Class<? extends BaseEntity> instanceClass, java.lang.Class<?> delimiter)  
      static FieldModule getInstance()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getInstance

        public static FieldModule getInstance()
      • getEntityFields

        public java.util.List<java.lang.reflect.Field> getEntityFields​(java.lang.Class<? extends BaseEntity> instanceClass)
      • getEntityFields

        public java.util.List<java.lang.reflect.Field> getEntityFields​(java.lang.Class<? extends BaseEntity> instanceClass,
                                                                       boolean includeForeignKeys)
      • getEntityFields

        public java.util.List<java.lang.reflect.Field> getEntityFields​(java.lang.Class<? extends BaseEntity> instanceClass,
                                                                       java.lang.Class<?> delimiter)
      • getAllFields

        public java.util.List<TableColumnReference> getAllFields​(java.lang.Class<? extends BaseEntity> instanceClass)
        Gets all the fields and the fields of foreign key objects in this entity.
        Parameters:
        instanceClass - The class to get the fields from.
        Returns:
        A list of columns including references to their table.