Class SubPojoDefinition

java.lang.Object
com.github.tadukoo.database.mysql.pojo.SubPojoDefinition

public class SubPojoDefinition extends Object
Sub Pojo Definition holds all the information for a sub pojo contained inside another pojo
Version:
Alpha v.0.3
Author:
Logan Ferree (Tadukoo)
  • Field Details

    • key

      private final String key
      The key the sub pojo is stored using in the pojo
    • idCol

      private final String idCol
      The ID column for the sub pojo's ID stored in the pojo
    • type

      private final Class<? extends DatabasePojo> type
      The class used for the sub pojo, in case the pojo has to create a new instance of it
    • junction

      private final com.github.tadukoo.util.tuple.Pair<ColumnRef,ColumnRef> junction
      The junction to use for this sub pojo when doing a search on the pojo
  • Constructor Details

    • SubPojoDefinition

      private SubPojoDefinition(String key, String idCol, Class<? extends DatabasePojo> type, com.github.tadukoo.util.tuple.Pair<ColumnRef,ColumnRef> junction)
      Constructs a new SubPojoDefinition using the given parameters
      Parameters:
      key - The key the sub pojo is stored using in the pojo
      idCol - The ID column for the sub pojo's ID stored in the pojo
      type - The class used for the sub pojo, in case the pojo has to create a new instance of it
      junction - The junction to use for this sub pojo when doing a search on the pojo
  • Method Details

    • builder

      public static SubPojoDefinition.Key builder()
      Returns:
      A builder to use to create a new SubPojoDefinition
    • getKey

      public String getKey()
      Returns:
      The key the sub pojo is stored using in the pojo
    • getIDCol

      public String getIDCol()
      Returns:
      The ID column for the sub pojo's ID stored in the pojo
    • getType

      public Class<? extends DatabasePojo> getType()
      Returns:
      The class used for the sub pojo, in case the pojo has to create a new instance of it
    • getJunction

      public com.github.tadukoo.util.tuple.Pair<ColumnRef,ColumnRef> getJunction()
      Returns:
      The junction to use for this sub pojo when doing a search on the pojo