public class SetColumnFamily<T> extends ColumnFamily<byte[]> implements Set<T>
PersistingElement.getIdentifier() and PersistingElement.getFullIdentifier()), and an empty byte array as value.
Elements stored in this set should not be mutable, as they are referred to using their key, that is if it changes afterwards, it's its key value that is actually used to be stored.
This Set does not support null values.
Elements are not actually stored in a real Set, its only their key that is stored by this set. However, retrieving an element from this set is still efficient thanks to the cache (see KeyManagement.createElement(Class, String).ColumnFamily.ChangeKindaddOnly, allChanged, changes, clazz, collection, increments, lastActivation, name, owner, property| Constructor and Description |
|---|
SetColumnFamily() |
SetColumnFamily(Class<T> clazz,
Field property,
PersistingElement owner) |
SetColumnFamily(Class<T> clazz,
Field property,
String name,
PersistingElement owner) |
| Modifier and Type | Method and Description |
|---|---|
void |
activate(Object from,
Object to) |
boolean |
add(T o)
Adds an element to the column family.
|
boolean |
addAll(Collection<? extends T> c)
Adds elements to the column family.
|
protected void |
addToPOJO(Object pojo,
String key,
byte[] element) |
void |
clear()
Removes all activated elements from the column family.
|
boolean |
contains(Object o)
Check whether this element exists in the activated elements.
|
boolean |
containsAll(Collection<?> c)
Returns true if this collection contains all of the elements in the collection of activated values only.
|
boolean |
containsInStore(Object o)
Checks whether this element exists in the family.
|
boolean |
equals(Object obj) |
protected String |
getIndex(T object) |
Serializable |
getSerializableVersion() |
Class<T> |
getSetElementClazz() |
int |
hashCode() |
Iterator<T> |
iterator()
Supplies an iterator over activated values only.
|
protected byte[] |
preparePut(String key,
byte[] rep) |
boolean |
remove(Object o)
Removes an element to the column family.
|
boolean |
removeAll(Collection<?> c)
Removes elements to the column family.
|
boolean |
retainAll(Collection<?> c)
Retains only the elements in this collection that are contained in the specified collection of activated elements.
|
protected void |
storeToPOJO(Object pojo) |
Object[] |
toArray()
Supplies an array that contains activated values only.
|
<U> U[] |
toArray(U[] a)
Supplies an array that contains activated values only.
|
protected void |
updateFromPOJO(Object pojo) |
activate, activate, activate, assertIsActivated, changedKeySet, clearChanges, compareTo, containsKey, getActivationDate, getClazz, getElement, getFromStore, getIncrement, getKeys, getName, getOwner, getPOJO, getProperty, hasChanged, hasChanged, incrementedKeySet, isActivated, isActivated, isAddOnly, isEmpty, isEmptyInStore, putElement, rebuild, removeKey, setActivated, setAllChanged, size, storeToPOJO, updateFromPOJO, wasChanged, wasDeletedclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitisEmpty, size, spliteratorparallelStream, removeIf, streampublic SetColumnFamily()
public SetColumnFamily(Class<T> clazz, Field property, PersistingElement owner) throws SecurityException, NoSuchFieldException
public SetColumnFamily(Class<T> clazz, Field property, String name, PersistingElement owner)
public Serializable getSerializableVersion()
getSerializableVersion in class ColumnFamily<byte[]>protected byte[] preparePut(String key, byte[] rep)
preparePut in class ColumnFamily<byte[]>public boolean add(T o)
PersistingElement.store() methodpublic boolean contains(Object o)
public boolean containsInStore(Object o) throws DatabaseNotReachedException
DatabaseNotReachedExceptionpublic boolean remove(Object o)
PersistingElement.store() method.public boolean containsAll(Collection<?> c)
containsAll in interface Collection<T>containsAll in interface Set<T>public boolean addAll(Collection<? extends T> c)
PersistingElement.store() methodpublic boolean removeAll(Collection<?> c)
PersistingElement.store() method.public boolean retainAll(Collection<?> c)
PersistingElement.store() method.public void clear()
PersistingElement.store() method.public Object[] toArray()
public <U> U[] toArray(U[] a)
public boolean equals(Object obj)
public int hashCode()
public void activate(Object from, Object to) throws DatabaseNotReachedException
activate in class ColumnFamily<byte[]>DatabaseNotReachedExceptionprotected void updateFromPOJO(Object pojo)
updateFromPOJO in class ColumnFamily<byte[]>protected void storeToPOJO(Object pojo)
storeToPOJO in class ColumnFamily<byte[]>protected void addToPOJO(Object pojo, String key, byte[] element)
addToPOJO in class ColumnFamily<byte[]>Copyright © 2016. All Rights Reserved.