Class SubPojoDefinition
java.lang.Object
com.github.tadukoo.database.mysql.pojo.SubPojoDefinition
Sub Pojo Definition holds all the information for a sub pojo contained inside another pojo
- Version:
- Alpha v.0.3
- Author:
- Logan Ferree (Tadukoo)
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
The building part of building aSubPojoDefinition
static interface
The ID column part of building aSubPojoDefinition
static interface
The Key part of building aSubPojoDefinition
static class
A builder used to build aSubPojoDefinition
.static interface
The Type and Junction part of building aSubPojoDefinition
-
Field Summary
Modifier and TypeFieldDescriptionprivate final String
The ID column for the sub pojo's ID stored in the pojoThe junction to use for this sub pojo when doing a search on the pojoprivate final String
The key the sub pojo is stored using in the pojoprivate final Class<? extends DatabasePojo>
The class used for the sub pojo, in case the pojo has to create a new instance of it -
Constructor Summary
ModifierConstructorDescriptionprivate
SubPojoDefinition
(String key, String idCol, Class<? extends DatabasePojo> type, com.github.tadukoo.util.tuple.Pair<ColumnRef, ColumnRef> junction) Constructs a newSubPojoDefinition
using the given parameters -
Method Summary
Modifier and TypeMethodDescriptionstatic SubPojoDefinition.Key
builder()
getIDCol()
getKey()
Class<? extends DatabasePojo>
getType()
-
Field Details
-
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
-
-
Constructor Details
-
SubPojoDefinition
private SubPojoDefinition(String key, String idCol, Class<? extends DatabasePojo> type, com.github.tadukoo.util.tuple.Pair<ColumnRef, ColumnRef> junction) Constructs a newSubPojoDefinition
using the given parameters- Parameters:
key
- The key the sub pojo is stored using in the pojoidCol
- The ID column for the sub pojo's ID stored in the pojotype
- The class used for the sub pojo, in case the pojo has to create a new instance of itjunction
- The junction to use for this sub pojo when doing a search on the pojo
-
-
Method Details
-
builder
- Returns:
- A
builder
to use to create a newSubPojoDefinition
-
getKey
- Returns:
- The key the sub pojo is stored using in the pojo
-
getIDCol
- Returns:
- The ID column for the sub pojo's ID stored in the pojo
-
getType
- Returns:
- The class used for the sub pojo, in case the pojo has to create a new instance of it
-
getJunction
- Returns:
- The junction to use for this sub pojo when doing a search on the pojo
-