- java.lang.Object
-
- io.github.mmm.event.AbstractEventSource<ObservableEvent<V>,ObservableEventListener<? super V>>
-
- io.github.mmm.value.observable.AbstractObservableValue<V>
-
- io.github.mmm.value.observable.AbstractWritableObservableValue<V>
-
- io.github.mmm.property.Property<V>
-
- io.github.mmm.property.object.SimpleProperty<V>
-
- io.github.mmm.property.object.ObjectProperty<Id<E>>
-
- io.github.mmm.entity.property.id.IdProperty<E>
-
- Type Parameters:
E- the generic type of theentity.
- All Implemented Interfaces:
EventSource<ObservableEvent<Id<E>>,ObservableEventListener<? super Id<E>>>,MarshallableObject,Marshaller<Object>,Marshalling<Object>,MarshallingObject,UnmarshallableObject,Unmarshaller<Object>,ReadableObjectProperty<Id<E>>,ReadableSimpleProperty<Id<E>>,WritableObjectProperty<Id<E>>,WritableSimpleProperty<Id<E>>,ReadableProperty<Id<E>>,WritableProperty<Id<E>>,Validatable,Expression<Id<E>>,ObservableObjectValue<Id<E>>,ObservableSimpleValue<Id<E>>,ReadableObjectValue<Id<E>>,ReadableSimpleValue<Id<E>>,WritableObjectValue<Id<E>>,WritableSimpleValue<Id<E>>,ObservableValue<Id<E>>,WritableObservableValue<Id<E>>,PropertyPath<Id<E>>,ReadableTypedValue<Id<E>>,ReadableValue<Id<E>>,TypedPropertyPath<Id<E>>,WritableValue<Id<E>>,Cloneable,Supplier<Id<E>>
public class IdProperty<E> extends ObjectProperty<Id<E>>
- Since:
- 1.0.0
-
-
Field Summary
Fields Modifier and Type Field Description static StringNAMEDefaultname.-
Fields inherited from interface io.github.mmm.property.WritableProperty
NO_PROPERTIES
-
-
Constructor Summary
Constructors Constructor Description IdProperty(IdFactory<?,?,?> idFactory, Class<E> entityClass)The constructor.IdProperty(IdFactory<?,?,?> idFactory, Class<E> entityClass, PropertyMetadata<Id<E>> metadata)The constructor.IdProperty(String name, IdFactory<?,?,?> idFactory, Class<E> entityClass)The constructor.IdProperty(String name, IdFactory<?,?,?> idFactory, Class<E> entityClass, PropertyMetadata<Id<E>> metadata)The constructor.IdProperty(String name, Class<? extends Id> idClass, PropertyMetadata<Id<E>> metadata)The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoSet(Id<E> newValue)protected IdFactory<?,?,?>getIdFactory()voidread(StructuredReader reader)voidwrite(StructuredWriter writer)-
Methods inherited from class io.github.mmm.property.object.ObjectProperty
doGet, getValueClass, parse
-
Methods inherited from class io.github.mmm.property.Property
clearValidationResult, clone, copy, doValidate, doValidate, equals, get, getMetadata, getName, getReadOnly, hashCode, isReadOnly, isValid, isValueMutable, readObject, requireWritable, setWithChange, toString, validate, writeObject
-
Methods inherited from class io.github.mmm.value.observable.AbstractWritableObservableValue
bindInternal, bindOneWay, bindTwoWay, isBoundOneWay, isValueEqual, set, unbindOneWay, unbindTwoWay
-
Methods inherited from class io.github.mmm.value.observable.AbstractObservableValue
addListener, fireChange, fireEvent, fireEvent, fireEventFor, fireEventFor, fireEventWithOldValue, hasChangeAwareListeners, invalidate, removeListener, toString
-
Methods inherited from class io.github.mmm.event.AbstractEventSource
getEventAdapter, hasListeners
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.github.mmm.event.EventSource
addListener, addListener, addWeakListener, removeListener
-
Methods inherited from interface io.github.mmm.value.observable.Expression
asString, dispose, isEqualTo, isEqualTo, isNotEqualTo, isNotEqualTo, isNotNull, isNull
-
Methods inherited from interface io.github.mmm.marshall.MarshallableObject
writeObject
-
Methods inherited from interface io.github.mmm.value.observable.ObservableValue
toString
-
Methods inherited from interface io.github.mmm.value.observable.object.ReadableObjectValue
getSafe, getValue
-
Methods inherited from interface io.github.mmm.property.ReadableProperty
getMetadata, getName, isReadOnly, isTransient, isValid
-
Methods inherited from interface io.github.mmm.property.object.ReadableSimpleProperty
getValueType
-
Methods inherited from interface io.github.mmm.value.observable.object.ReadableSimpleValue
getAsString
-
Methods inherited from interface io.github.mmm.value.ReadableValue
get
-
Methods inherited from interface io.github.mmm.marshall.UnmarshallableObject
readObject
-
Methods inherited from interface io.github.mmm.validation.Validatable
validate
-
Methods inherited from interface io.github.mmm.value.observable.object.WritableObjectValue
setValue
-
Methods inherited from interface io.github.mmm.value.observable.WritableObservableValue
bindOneWay, bindTwoWay, isBoundOneWay, unbindOneWay, unbindTwoWay
-
Methods inherited from interface io.github.mmm.property.WritableProperty
copy, getReadOnly
-
Methods inherited from interface io.github.mmm.value.observable.object.WritableSimpleValue
setAsString
-
Methods inherited from interface io.github.mmm.value.WritableValue
set
-
-
-
-
Field Detail
-
NAME
public static final String NAME
Defaultname.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
IdProperty
public IdProperty(IdFactory<?,?,?> idFactory, Class<E> entityClass, PropertyMetadata<Id<E>> metadata)
The constructor.
-
IdProperty
public IdProperty(String name, IdFactory<?,?,?> idFactory, Class<E> entityClass)
The constructor.
-
IdProperty
public IdProperty(String name, Class<? extends Id> idClass, PropertyMetadata<Id<E>> metadata)
The constructor.- Parameters:
name- thename.idClass- thevalue classreflecting the containedId.metadata- themetadata.
-
-
Method Detail
-
doSet
protected void doSet(Id<E> newValue)
- Overrides:
doSetin classObjectProperty<Id<E>>- Parameters:
newValue- the newvalueto set.- See Also:
AbstractWritableObservableValue.set(Object)
-
read
public void read(StructuredReader reader)
- Specified by:
readin interfaceUnmarshallableObject- Overrides:
readin classSimpleProperty<Id<E>>- Parameters:
reader- theStructuredReaderwhere to read the data from. This object will be modified such that the read data will be applied. For complex objects (e.g. beans with multiple properties) those properties not defined in the data that is read will not be overwritten. In order to get a clean representation of the data from the given reader you should invoke this method on an empty object.
-
write
public void write(StructuredWriter writer)
- Specified by:
writein interfaceMarshallableObject- Overrides:
writein classSimpleProperty<Id<E>>- Parameters:
writer- theStructuredWriterwhere to marshall (serialize) the data of this object to.- See Also:
MarshallableObject.writeObject(StructuredWriter, Object)
-
-