public class GQLEntityMetaData extends GQLAbstractMetaData
| Constructor and Description |
|---|
GQLEntityMetaData()
Default constructor
|
GQLEntityMetaData(String name,
Class<?> entityClass)
Constructor passing name and entity class.
|
GQLEntityMetaData(String name,
Class<?> entityClass,
boolean concrete)
Constructor passing name and entity class.
|
GQLEntityMetaData(String name,
Class<?> entityClass,
Class<?> superEntityClass)
Constructor passing name, entity class and super entity class and keeping
default values for other attributes.
|
GQLEntityMetaData(String name,
Class<?> entityClass,
Class<?> superEntityClass,
boolean concrete)
Constructor passing name, entity class and super entity class and keeping
default values for other attributes.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAttribute(GQLAbstractAttributeMetaData attribute)
Add given attribute if non null
|
GQLEntityMetaData |
addRights(GQLEntityRightsMetaData... rightsArray)
Add given rights
|
protected void |
appendToString(StringBuilder stringBuilder) |
List<GQLAbstractAttributeMetaData> |
getAttributes()
Get attributes of the entity
|
String |
getDescription()
Get the description for the entity.
|
Class<?> |
getEntityClass()
Get the entity class.
|
String |
getName()
Set the name for the entity.
|
List<GQLEntityRightsMetaData> |
getRights() |
Class<?> |
getSuperEntityClass()
Get the super class for the entity.
|
boolean |
isConcrete()
Get whether the entity is a concrete class (
true) or
abstract class (false). |
boolean |
isDeletable(GQLExecutionContext executionContext)
Get whether this entity is deleteable in given context
|
boolean |
isEmbedded() |
boolean |
isReadable(GQLExecutionContext executionContext)
Get whether this entity is readable in given context
|
boolean |
isSaveable(GQLExecutionContext executionContext)
Get whether this entity is saveable in given context
|
GQLEntityMetaData |
setAttributes(List<GQLAbstractAttributeMetaData> attributes)
Set the entity attributes
|
GQLEntityMetaData |
setConcrete(boolean concrete)
Set whether the entity is a concrete class (
true) or
abstract class (false). |
GQLEntityMetaData |
setDescription(String description)
Set the description for the entity.
|
GQLEntityMetaData |
setEmbedded(boolean embedded) |
GQLEntityMetaData |
setEntityClass(Class<?> entityClass)
Set the entity class
|
GQLEntityMetaData |
setName(String name)
Get the name for the entity.
|
void |
setRights(List<GQLEntityRightsMetaData> rights) |
GQLEntityMetaData |
setSuperEntityClass(Class<?> superEntityClass)
Set the super class for the entity.
|
finalizeToString, toStringpublic GQLEntityMetaData()
public GQLEntityMetaData(String name, Class<?> entityClass)
concrete to false.name - the name for the attribute. This name will be used for
building GraphQL schema : queries, mutations, descriptions
etc.entityClass - the entity classpublic GQLEntityMetaData(String name, Class<?> entityClass, boolean concrete)
name - the name for the attribute. This name will be used for
building GraphQL schema : queries, mutations, descriptions
etc.entityClass - the entity classconcrete - whether the entity is a concrete class (true) or
abstract class (false). Default is
true.public GQLEntityMetaData(String name, Class<?> entityClass, Class<?> superEntityClass)
concrete to false.name - the name for the attribute. This name will be used for
building GraphQL schema : queries, mutations, descriptions
etc.entityClass - the entity classsuperEntityClass - the super entity classpublic GQLEntityMetaData(String name, Class<?> entityClass, Class<?> superEntityClass, boolean concrete)
name - the name for the attribute. This name will be used for
building GraphQL schema : queries, mutations, descriptions
etc.entityClass - the entity classsuperEntityClass - the super entity classconcrete - whether the entity is a concrete class (true) or
abstract class (false). Default is
true.protected void appendToString(StringBuilder stringBuilder)
appendToString in class GQLAbstractMetaDatapublic void addAttribute(GQLAbstractAttributeMetaData attribute)
attribute - the GQLAbstractAttributeMetaData to be addedpublic boolean isSaveable(GQLExecutionContext executionContext)
executionContext - the GQLExecutionContextpublic boolean isReadable(GQLExecutionContext executionContext)
executionContext - the GQLExecutionContextpublic boolean isDeletable(GQLExecutionContext executionContext)
executionContext - the GQLExecutionContextpublic GQLEntityMetaData addRights(GQLEntityRightsMetaData... rightsArray)
rightsArray - the array of GQLEntityRightsMetaData to be addedpublic List<GQLEntityRightsMetaData> getRights()
public void setRights(List<GQLEntityRightsMetaData> rights)
rights - the rights to setpublic String getDescription()
public GQLEntityMetaData setDescription(String description)
description - the description to setpublic boolean isConcrete()
true) or
abstract class (false). Default is true.public GQLEntityMetaData setConcrete(boolean concrete)
true) or
abstract class (false). Default is true.concrete - the concrete to setpublic String getName()
public GQLEntityMetaData setName(String name)
name - the name to setpublic Class<?> getSuperEntityClass()
public GQLEntityMetaData setSuperEntityClass(Class<?> superEntityClass)
Object.superEntityClass - the superEntityClass to setpublic Class<?> getEntityClass()
public GQLEntityMetaData setEntityClass(Class<?> entityClass)
entityClass - the entityClass to setpublic List<GQLAbstractAttributeMetaData> getAttributes()
public GQLEntityMetaData setAttributes(List<GQLAbstractAttributeMetaData> attributes)
attributes - the attributes to setpublic boolean isEmbedded()
public GQLEntityMetaData setEmbedded(boolean embedded)
embedded - the embedded to setCopyright © 2019–2020. All rights reserved.