java.lang.Object
fr.paris.lutece.plugins.genericattributes.business.FieldHome

public final class FieldHome extends Object
This class provides instances management methods (create, find, ...) for Field objects
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    copy(Field field)
    Copy of an instance of field
    static int
    create(Field field)
    Creation of an instance of field
    static int
    create(Field field, boolean bNotify)
    Creation of an instance of field
    static void
    createVerifyBy(int nIdField, int nIdExpression)
    Insert an association between field and a regular expression
    static Field
    findByPrimaryKey(int nKey)
    Returns an instance of a Field whose identifier is specified in parameter
    static List<String>
    Get the titles of the entries whose fields are verified by the regular expression
    static List<Field>
    Load the data of all the field by code
    static List<Field>
    getFieldListByIdEntry(int nIdEntry)
    Load the data of all the field of the entry and returns them in a list
    static List<Field>
    Load the data of all the field of the list of entry entry and returns them in a list
    static List<Integer>
    Load the key of all the regularExpression associate to the field and returns them in a list
    static boolean
    isRegularExpressionIsUse(int nIdExpression)
    Verify if the regular expression is use
    static void
    Notifies the observers of the entries (the caches of the forms and appointments) that the fields of an entry changed: the choices of a question are fields, cached with the question
    static void
    remove(int nIdField)
    Remove the field whose identifier is specified in parameter
    static void
    remove(int nIdField, boolean bNotify)
    Delete an instance of the field whose identifier is specified in parameter
    static void
    removeVerifyBy(int nIdField, int nIdExpression)
    Delete an association between field and a regular expression
    static void
    update(Field field)
    Update of the field which is specified in parameter
    static void
    update(Field field, boolean bNotify)
    Update of the field which is specified in parameter

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • create

      public static int create(Field field)
      Creation of an instance of field
      Parameters:
      field - The instance of the Field which contains the informations to store
      Returns:
      The primary key of the new Field.
    • create

      public static int create(Field field, boolean bNotify)
      Creation of an instance of field
      Parameters:
      field - The instance of the Field which contains the informations to store
      bNotify - false when the caller changes several fields of the entry and fires one event with notifyEntryUpdate(Entry)
      Returns:
      The primary key of the new Field.
    • copy

      public static void copy(Field field)
      Copy of an instance of field
      Parameters:
      field - The instance of the Field who must copy
    • update

      public static void update(Field field)
      Update of the field which is specified in parameter
      Parameters:
      field - The instance of the Field which contains the informations to update
    • update

      public static void update(Field field, boolean bNotify)
      Update of the field which is specified in parameter
      Parameters:
      field - The instance of the Field which contains the informations to update
      bNotify - false when the caller changes several fields of the entry and fires one event with notifyEntryUpdate(Entry)
    • remove

      public static void remove(int nIdField)
      Remove the field whose identifier is specified in parameter
      Parameters:
      nIdField - The field Id
    • remove

      public static void remove(int nIdField, boolean bNotify)
      Delete an instance of the field whose identifier is specified in parameter
      Parameters:
      nIdField - The field Id
      bNotify - false when the caller removes several fields of the entry or the entry itself and fires one event
    • notifyEntryUpdate

      public static void notifyEntryUpdate(Entry entry)
      Notifies the observers of the entries (the caches of the forms and appointments) that the fields of an entry changed: the choices of a question are fields, cached with the question
      Parameters:
      entry - the parent entry of the field, may be null
    • findByPrimaryKey

      public static Field findByPrimaryKey(int nKey)
      Returns an instance of a Field whose identifier is specified in parameter
      Parameters:
      nKey - The field primary key
      Returns:
      an instance of Field
    • getFieldListByIdEntry

      public static List<Field> getFieldListByIdEntry(int nIdEntry)
      Load the data of all the field of the entry and returns them in a list
      Parameters:
      nIdEntry - the id of the entry
      Returns:
      the list of field
    • removeVerifyBy

      public static void removeVerifyBy(int nIdField, int nIdExpression)
      Delete an association between field and a regular expression
      Parameters:
      nIdField - The identifier of the field
      nIdExpression - The identifier of the regular expression
    • createVerifyBy

      public static void createVerifyBy(int nIdField, int nIdExpression)
      Insert an association between field and a regular expression
      Parameters:
      nIdField - The identifier of the field
      nIdExpression - The identifier of the regular expression
    • getListRegularExpressionKeyByIdField

      public static List<Integer> getListRegularExpressionKeyByIdField(int nIdField)
      Load the key of all the regularExpression associate to the field and returns them in a list
      Parameters:
      nIdField - the id of the field
      Returns:
      the list of regular expression key
    • isRegularExpressionIsUse

      public static boolean isRegularExpressionIsUse(int nIdExpression)
      Verify if the regular expression is use
      Parameters:
      nIdExpression - The identifier of the regular expression
      Returns:
      true if the regular expression is use
    • getEntryTitlesByRegularExpression

      public static List<String> getEntryTitlesByRegularExpression(int nIdExpression)
      Get the titles of the entries whose fields are verified by the regular expression
      Parameters:
      nIdExpression - The identifier of the regular expression
      Returns:
      the titles of the entries, one per field verified by the regular expression
    • getFieldListByCode

      public static List<Field> getFieldListByCode(String code)
      Load the data of all the field by code
      Parameters:
      code -
      Returns:
      the list of field
    • getFieldListByListIdEntry

      public static List<Field> getFieldListByListIdEntry(List<Integer> idList)
      Load the data of all the field of the list of entry entry and returns them in a list
      Parameters:
      idList - the ids of the entries
      Returns:
      the list of field