org.openrdf.repository.object.composition.helpers
Class UnmodifiableProperty

java.lang.Object
  extended by org.openrdf.repository.object.composition.helpers.UnmodifiableProperty
Type Parameters:
E - property type
All Implemented Interfaces:
PropertySet, Refreshable

public class UnmodifiableProperty
extends Object
implements PropertySet

Property used when only a getter method exists for the Bean property.

Author:
James Leigh

Field Summary
 
Fields inherited from interface org.openrdf.repository.object.composition.helpers.PropertySet
ADD_ALL, ADD_SINGLE, GET_ALL, GET_SINGLE, SET_ALL, SET_SINGLE
 
Constructor Summary
UnmodifiableProperty(PropertySet delegate)
           
 
Method Summary
 boolean add(Object single)
          Append values with this value
 boolean addAll(Collection<?> all)
          Append all values with the values given.
 Set<Object> getAll()
          Get all values for property.
 Object getSingle()
          Assumes there is zero or one value and return null or the value.
 void refresh()
          Flushes the local state of the entity forcing it to refresh.
 void setAll(Set<?> all)
          Replaces all values with the values given.
 void setSingle(Object single)
          Replace all values with this value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnmodifiableProperty

public UnmodifiableProperty(PropertySet delegate)
Method Detail

getAll

public Set<Object> getAll()
Description copied from interface: PropertySet
Get all values for property.

Specified by:
getAll in interface PropertySet
Returns:
set of all values

getSingle

public Object getSingle()
Description copied from interface: PropertySet
Assumes there is zero or one value and return null or the value.

Specified by:
getSingle in interface PropertySet
Returns:
null or the single value

setAll

public void setAll(Set<?> all)
Description copied from interface: PropertySet
Replaces all values with the values given.

Specified by:
setAll in interface PropertySet

setSingle

public void setSingle(Object single)
Description copied from interface: PropertySet
Replace all values with this value

Specified by:
setSingle in interface PropertySet

refresh

public void refresh()
Description copied from interface: Refreshable
Flushes the local state of the entity forcing it to refresh.

Specified by:
refresh in interface Refreshable

add

public boolean add(Object single)
Description copied from interface: PropertySet
Append values with this value

Specified by:
add in interface PropertySet

addAll

public boolean addAll(Collection<?> all)
Description copied from interface: PropertySet
Append all values with the values given.

Specified by:
addAll in interface PropertySet


Copyright © 2004-2011 James Leigh Services Inc.. All Rights Reserved.