Class DisplayField

  • Direct Known Subclasses:
    DisplayCollection, DisplayReference

    public class DisplayField
    extends java.lang.Object
    Class to represent a field of an object for the webapp
    Author:
    Kim Rutherford
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static org.apache.log4j.Logger LOG  
    • Constructor Summary

      Constructors 
      Constructor Description
      DisplayField​(java.util.Collection<?> collection, FieldDescriptor fd, WebConfig webConfig, java.util.Properties webProperties, java.util.Map<java.lang.String,​java.util.List<FieldDescriptor>> classKeys, java.util.List<java.lang.Class<?>> listOfTypes)
      Create a new DisplayField object.
      DisplayField​(java.util.Collection<?> collection, FieldDescriptor fd, WebConfig webConfig, java.util.Properties webProperties, java.util.Map<java.lang.String,​java.util.List<FieldDescriptor>> classKeys, java.util.List<java.lang.Class<?>> listOfTypes, java.lang.String objectType)
      Create a new DisplayField object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getSize()
      Get the size of this collection
      InlineResultsTable getTable()
      Get the inline results table for this collection
      boolean isEmpty()
      Return true if the collection is empty or reference null.
      • Methods inherited from class java.lang.Object

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

      • LOG

        protected static final org.apache.log4j.Logger LOG
    • Constructor Detail

      • DisplayField

        public DisplayField​(java.util.Collection<?> collection,
                            FieldDescriptor fd,
                            WebConfig webConfig,
                            java.util.Properties webProperties,
                            java.util.Map<java.lang.String,​java.util.List<FieldDescriptor>> classKeys,
                            java.util.List<java.lang.Class<?>> listOfTypes)
                     throws java.lang.Exception
        Create a new DisplayField object.
        Parameters:
        collection - the List the holds the object(s) to display
        fd - metadata for the referenced object
        webConfig - the WebConfig object for this webapp
        webProperties - telling us how many Collection rows to show
        classKeys - Map of class name to set of keys
        listOfTypes - as determined using PathQueryResultHelper on a Collection
        Throws:
        java.lang.Exception - if an error occurs
      • DisplayField

        public DisplayField​(java.util.Collection<?> collection,
                            FieldDescriptor fd,
                            WebConfig webConfig,
                            java.util.Properties webProperties,
                            java.util.Map<java.lang.String,​java.util.List<FieldDescriptor>> classKeys,
                            java.util.List<java.lang.Class<?>> listOfTypes,
                            java.lang.String objectType)
                     throws java.lang.Exception
        Create a new DisplayField object.
        Parameters:
        collection - the List the holds the object(s) to display
        fd - metadata for the referenced object
        webConfig - the WebConfig object for this webapp
        webProperties - telling us how many Collection rows to show
        classKeys - Map of class name to set of keys
        listOfTypes - as determined using PathQueryResultHelper on a Collection
        objectType - the type of the object.
        Throws:
        java.lang.Exception - if an error occurs
    • Method Detail

      • getTable

        public InlineResultsTable getTable()
        Get the inline results table for this collection
        Returns:
        the results table
      • isEmpty

        public boolean isEmpty()
        Return true if the collection is empty or reference null.
        Returns:
        true if collection/reference is empty
      • getSize

        public int getSize()
        Get the size of this collection
        Returns:
        the size