Module io.github.mmm.entity.bean
Package io.github.mmm.entity.bean.sql
Class AbstractEntitiesClause<E extends EntityBean,SELF extends AbstractEntitiesClause<E,SELF>>
- java.lang.Object
-
- io.github.mmm.marshall.AbstractMarshallingObject
-
- io.github.mmm.entity.bean.sql.AbstractClause
-
- io.github.mmm.entity.bean.sql.AbstractTypedClause<E,SELF>
-
- io.github.mmm.entity.bean.sql.AbstractEntityClause<E,SELF>
-
- io.github.mmm.entity.bean.sql.AbstractEntitiesClause<E,SELF>
-
- Type Parameters:
E- type of theentity.SELF- type of this class itself.
- All Implemented Interfaces:
Clause,TypedClause<E>,io.github.mmm.marshall.MarshallableObject,io.github.mmm.marshall.Marshaller<Object>,io.github.mmm.marshall.Marshalling<Object>,io.github.mmm.marshall.MarshallingObject,io.github.mmm.marshall.UnmarshallableObject,io.github.mmm.marshall.Unmarshaller<Object>
- Direct Known Subclasses:
From
public abstract class AbstractEntitiesClause<E extends EntityBean,SELF extends AbstractEntitiesClause<E,SELF>> extends AbstractEntityClause<E,SELF>
AAbstractEntitiesClauseis aClauseof an SQLStatementthat specifies theentityand/orentity name(table) to operate on.- Since:
- 1.0.0
-
-
Field Summary
Fields Modifier and Type Field Description static StringNAME_ADDITIONAL_ENTITIESName of propertyAbstractEntityClause.getEntityName()for marshalling.-
Fields inherited from class io.github.mmm.entity.bean.sql.AbstractEntityClause
entity, NAME_ALIAS, NAME_ENTITY
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractEntitiesClause(E entity)The constructor.protectedAbstractEntitiesClause(E entity, String entityName)The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SELFand(EntityBean additionalEntity)SELFand(EntityBean additionalEntity, String alias)protected SELFand(EntitySubClause<?> entityFragment)SELFand(String entityName, EntityBean additionalEntity, String alias)List<EntitySubClause<?>>getAdditionalEntities()protected voidreadProperty(io.github.mmm.marshall.StructuredReader reader, String name)protected voidwriteProperties(io.github.mmm.marshall.StructuredWriter writer)-
Methods inherited from class io.github.mmm.entity.bean.sql.AbstractEntityClause
as, getAlias, getEntity, getEntityName, setEntityName
-
Methods inherited from class io.github.mmm.entity.bean.sql.AbstractTypedClause
self
-
Methods inherited from class io.github.mmm.entity.bean.sql.AbstractClause
getMarshallingName, toString
-
-
-
-
Field Detail
-
NAME_ADDITIONAL_ENTITIES
public static final String NAME_ADDITIONAL_ENTITIES
Name of propertyAbstractEntityClause.getEntityName()for marshalling.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AbstractEntitiesClause
protected AbstractEntitiesClause(E entity)
The constructor.- Parameters:
entity- theentity.
-
AbstractEntitiesClause
protected AbstractEntitiesClause(E entity, String entityName)
The constructor.- Parameters:
entity- theentityto operate on.entityName- theentity name.
-
-
Method Detail
-
and
public SELF and(EntityBean additionalEntity)
-
and
public SELF and(EntityBean additionalEntity, String alias)
-
and
public SELF and(String entityName, EntityBean additionalEntity, String alias)
- Parameters:
entityName- theentity name.additionalEntity- the additionalentityto access (similar to a JOIN).alias- thealias.- Returns:
- this
Clauseitself for fluent API calls.
-
and
protected SELF and(EntitySubClause<?> entityFragment)
- Parameters:
entityFragment- theEntitySubClauseto add.- Returns:
- this
Clauseitself for fluent API calls.
-
getAdditionalEntities
public List<EntitySubClause<?>> getAdditionalEntities()
- Returns:
- the
ListofEntitySubClauses in addition to themain entity.
-
writeProperties
protected void writeProperties(io.github.mmm.marshall.StructuredWriter writer)
- Overrides:
writePropertiesin classAbstractEntityClause<E extends EntityBean,SELF extends AbstractEntitiesClause<E,SELF>>
-
readProperty
protected void readProperty(io.github.mmm.marshall.StructuredReader reader, String name)- Overrides:
readPropertyin classAbstractEntityClause<E extends EntityBean,SELF extends AbstractEntitiesClause<E,SELF>>
-
-