public abstract class Entity<EntityT> extends Object
Constructor and Description |
---|
Entity() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
<T> T |
getCustomField(EntityField<EntityT,T> customField)
This method allows for retrieval of custom fields that are added to the underlying OData services.
|
<T> T |
getCustomField(String customFieldName)
This method allows for retrieval of custom fields that are added to the underlying OData services.
|
Set<String> |
getCustomFieldNames() |
Map<String,Object> |
getCustomFields() |
abstract Class<EntityT> |
getType() |
boolean |
hasCustomField(EntityField<EntityT,?> customField) |
boolean |
hasCustomField(String customFieldName) |
int |
hashCode() |
void |
setCustomField(String key,
Object value)
Set the value of a single custom field.
|
String |
toString() |
public Set<String> getCustomFieldNames()
public Map<String,Object> getCustomFields()
public void setCustomField(String key, Object value)
key
- Name of the custom fieldvalue
- Value of the custom fieldpublic boolean hasCustomField(String customFieldName)
customFieldName
- Name of the custom field to check fortrue
if this entity has a custom field with the given name, false
otherwise.public boolean hasCustomField(EntityField<EntityT,?> customField)
customField
- Custom field to check for, represented as an EntityField
objecttrue
if this entity has a custom field with the name of the given field, false
otherwise.@Nullable public <T> T getCustomField(String customFieldName) throws NoSuchEntityFieldException
customFieldName
- Name of the field returned by the underlying OData service.NoSuchEntityFieldException
@Nullable public <T> T getCustomField(EntityField<EntityT,T> customField) throws NoSuchEntityFieldException
customField
- Field returned by the underlying OData service.NoSuchEntityFieldException
@Generated(value="lombok") public String toString()
@Generated(value="lombok") public boolean equals(Object o)
@Generated(value="lombok") public int hashCode()
Copyright © 2017 SAP SE. All rights reserved.