Class DatabaseInstance.PropertyField<V,W extends DatabaseInstance<W>>

java.lang.Object
com.syzygy.events.database.DatabaseInstance.PropertyField<V,W>
Type Parameters:
V - The type of the value that the property stores
W - The type of the instance that the property stores if applicable
Enclosing class:
DatabaseInstance<T extends DatabaseInstance<T>>

public static class DatabaseInstance.PropertyField<V,W extends DatabaseInstance<W>> extends Object
Designates a property that is maintained by a Database instance
  • Field Details

    • propertyNameID

      public final int propertyNameID
      The ID of the res string that defines the string used for the property key in the database
    • isValid

      public final Predicate<Object> isValid
      The function to test if a given value is valid for this property
    • canEdit

      public final boolean canEdit
      If the property can be edited
    • loads

      public final boolean loads
      If the property loads an instance
    • loadsCollection

      public final Database.Collections loadsCollection
      The collection that the instance is apart of if applicable
    • loadsNullable

      public final boolean loadsNullable
      If the instance can be null
    • cascadeDelete

      public final boolean cascadeDelete
  • Constructor Details

    • PropertyField

      public PropertyField(int propertyNameID, Predicate<Object> isValid, boolean canEdit, boolean loads, Database.Collections loadsCollection, boolean nullable, boolean cascadeDelete)
      Parameters:
      propertyNameID - The ID of the res string that defines the string used for the property key in the database
      isValid - The function to test if a given value is valid for this property
      canEdit - If the property can be edited
      loads - If the property loads an instance
      loadsCollection - The collection that the instance is apart of if applicable
      nullable - If the instance can be null
      cascadeDelete - If the instance should be deleted upon the deletion of this instance
    • PropertyField

      public PropertyField(int propertyNameID, Predicate<Object> isValid, boolean canEdit)

      Sets loads to false

      Parameters:
      propertyNameID - The ID of the res string that defines the string used for the property key in the database
      isValid - The function to test if a given value is valid for this property
      canEdit - If the property can be edited
  • Method Details