public abstract class GQLAbstractAttributeMetaData extends GQLAbstractMetaData
| Constructor and Description |
|---|
GQLAbstractAttributeMetaData()
Default constructor
|
GQLAbstractAttributeMetaData(String name)
Constructor passing name and keeping default values for other attributes.
|
| Modifier and Type | Method and Description |
|---|---|
GQLAbstractAttributeMetaData |
addRights(GQLAttributeRightsMetaData... rightsArray)
Add given rights
|
protected void |
appendToString(StringBuilder stringBuilder) |
String |
getDescription()
Get the description for the attribute.
|
IGQLDynamicAttributeGetter<?,?> |
getDynamicAttributeGetter()
If this attribute is dynamic then this method returns the getter for
computing the attribute value.
|
IGQLDynamicAttributeSetter<?,?> |
getDynamicAttributeSetter()
If this attribute is dynamic then this method returns the setter for
storing the attribute value.
|
String |
getName()
Get the name for the attribute.
|
List<GQLAttributeRightsMetaData> |
getRights() |
boolean |
isDynamic()
Get whether this attribute is dynamic, which means that either a
dynamicAttributeGetter or a dynamicAttributeSetter (or both) is/are set.
|
boolean |
isDynamicAttributeGetter()
Get whether this attribute is a dynamic attribute getter, which means
that a dynamicAttributeGetter is set
|
boolean |
isDynamicAttributeSetter()
Get whether this attribute is a dynamic attribute setter, which means
that a dynamicAttributeSetter is set
|
boolean |
isFilterable()
Get whether this attribute will be available in schema queries filters
for retrieving this attribute parent entity.
|
boolean |
isMandatoryForCreate(GQLExecutionContext executionContext)
Get whether this attribute is mandatory for creation in given context
|
boolean |
isMandatoryForUpdate(GQLExecutionContext executionContext)
Get whether this attribute is mandatory for update in given context
|
boolean |
isNullableForCreate(GQLExecutionContext executionContext)
Get whether this attribute is nullable for creation in given context
|
boolean |
isNullableForUpdate(GQLExecutionContext executionContext)
Get whether this attribute is nullable for update in given context
|
boolean |
isReadable(GQLExecutionContext executionContext)
Get whether this attribute is readable in given context
|
boolean |
isSaveable(GQLExecutionContext executionContext)
Get whether this attribute is saveable in given context
|
GQLAbstractAttributeMetaData |
setDescription(String description)
Set the description for the attribute.
|
GQLAbstractAttributeMetaData |
setDynamicAttributeGetter(IGQLDynamicAttributeGetter<?,?> dynamicAttributeGetter)
If this attribute is dynamic then this method sets the getter for
computing the attribute value.
|
GQLAbstractAttributeMetaData |
setDynamicAttributeSetter(IGQLDynamicAttributeSetter<?,?> dynamicAttributeSetter)
If this attribute is dynamic then this method sets the setter for storing
the attribute value.
|
GQLAbstractAttributeMetaData |
setFilterable(boolean filterable)
Set whether this attribute will be available in schema queries filters
for retrieving this attribute parent entity.
|
GQLAbstractAttributeMetaData |
setName(String name)
Set the name for the attribute.
|
void |
setRights(List<GQLAttributeRightsMetaData> rights) |
finalizeToString, toStringpublic GQLAbstractAttributeMetaData()
public GQLAbstractAttributeMetaData(String name)
name - the name for the attribute. This name will be used for
building GraphQL schema : queries, mutations, descriptions
etc.protected void appendToString(StringBuilder stringBuilder)
appendToString in class GQLAbstractMetaDatapublic boolean isSaveable(GQLExecutionContext executionContext)
executionContext - the GQLExecutionContextpublic boolean isReadable(GQLExecutionContext executionContext)
executionContext - the GQLExecutionContextpublic boolean isNullableForCreate(GQLExecutionContext executionContext)
executionContext - the GQLExecutionContextpublic boolean isNullableForUpdate(GQLExecutionContext executionContext)
executionContext - the GQLExecutionContextpublic boolean isMandatoryForCreate(GQLExecutionContext executionContext)
executionContext - the GQLExecutionContextpublic boolean isMandatoryForUpdate(GQLExecutionContext executionContext)
executionContext - the GQLExecutionContextpublic boolean isDynamic()
public boolean isDynamicAttributeSetter()
public boolean isDynamicAttributeGetter()
public GQLAbstractAttributeMetaData addRights(GQLAttributeRightsMetaData... rightsArray)
rightsArray - the array of GQLAttributeRightsMetaData to be addedpublic List<GQLAttributeRightsMetaData> getRights()
public void setRights(List<GQLAttributeRightsMetaData> rights)
rights - the rights to setpublic String getDescription()
public GQLAbstractAttributeMetaData setDescription(String description)
description - the description to setpublic String getName()
public GQLAbstractAttributeMetaData setName(String name)
name - the name to setpublic boolean isFilterable()
true.public GQLAbstractAttributeMetaData setFilterable(boolean filterable)
filterable - the filterable to setpublic IGQLDynamicAttributeGetter<?,?> getDynamicAttributeGetter()
IGQLDynamicAttributeGetter then if this attribute is set in
schema queries for retrieving this attribute parent entity then this
getter will be called with this attribute value as parameter.)public GQLAbstractAttributeMetaData setDynamicAttributeGetter(IGQLDynamicAttributeGetter<?,?> dynamicAttributeGetter)
IGQLDynamicAttributeGetter then if this attribute is set in
schema queries for retrieving this attribute parent entity then this
getter will be called with this attribute value as parameter.)dynamicAttributeGetter - the dynamicAttributeGetter to setpublic IGQLDynamicAttributeSetter<?,?> getDynamicAttributeSetter()
IGQLDynamicAttributeSetter then if this attribute is set in
schema mutations for saving this attribute parent entity then this setter
will be called with this attribute value as parameter.)public GQLAbstractAttributeMetaData setDynamicAttributeSetter(IGQLDynamicAttributeSetter<?,?> dynamicAttributeSetter)
IGQLDynamicAttributeSetter then if this attribute is set in
schema mutations for saving this attribute parent entity then this setter
will be called with this attribute value as parameter.)dynamicAttributeSetter - the dynamicAttributeSetter to setCopyright © 2019–2020. All rights reserved.