java.lang.Object
simpleorm.dataset.SRecordMeta<T>
com.inductiveautomation.ignition.gateway.localdb.persistence.RecordMeta<T>
All Implemented Interfaces:
Serializable

public class RecordMeta<T extends PersistentRecord> extends SRecordMeta<T>
Simple renaming class of SRecordMeta to be consistent.
See Also:
  • Field Details

  • Constructor Details

    • RecordMeta

      public RecordMeta(Class<T> userClass, String tableName)
  • Method Details

    • getNameField

      public static SFieldMeta getNameField(SRecordMeta<?> meta)
      Returns the field for the record type that represents the record's name. If it has not been explicitly set, it looks for a field with the name "Name". If none exists, it looks for the first descriptive scalar field. If there is none, it returns null.
      Returns:
      A field that represents the name of the record, or null if none can be found.
    • getRecordName

      public static String getRecordName(SRecordInstance record)
      Attempts to return the "name" of any given record instance, using heuristics to find the name field (i.e. it guesses that it is named "Name". See getNameField() logic.
    • getRecordNameIfExists

      public static String getRecordNameIfExists(SRecordInstance record)
      Attempts to return the "name" of any given record instance, using heuristics to find the name field (i.e. it guesses that it is named "Name". Will return null if it can't find a name unlike getRecordName(), which returns the record.toString() if a name field can't be found.
    • getRecordNameIfExists

      public static String getRecordNameIfExists(RecordInstanceForeignKey rfk)
      Attempts to return the "name" of any given record instance, using heuristics to find the name field (i.e. it guesses that it is named "Name".) If the name cannot be located in this way, the foreign key column name is returned instead.
    • getRecordDescription

      public static String getRecordDescription(SRecordInstance record)
      Attempts to return the "description" of any given record instance, using heuristics to find the name field (i.e. it guesses that it is named "Description" or "Desc".
    • addRecordListener

      public void addRecordListener(IRecordListener<T> listener)
    • removeRecordListener

      public void removeRecordListener(IRecordListener<T> listener)
    • getRecordListeners

      public IRecordListener<T>[] getRecordListeners()
    • getRecordListenerCount

      public int getRecordListenerCount()
    • setNounKey

      public RecordMeta<T> setNounKey(String key)
    • setNounPluralKey

      public RecordMeta<T> setNounPluralKey(String key)
    • getRecordTypeName

      public String getRecordTypeName(Locale locale)