T - the typeR - the registry for the given typepublic class RegistrySerializer<T,R extends com.cedarsoft.registry.Registry<T>,O,I> extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
RegistrySerializer.IdResolver<T> |
| Constructor and Description |
|---|
RegistrySerializer(RegistrySerializingStrategy<T> serializingStrategy,
RegistrySerializer.IdResolver<T> idResolver)
Creates a new registry serializer
|
RegistrySerializer(RegistrySerializingStrategy<T> serializingStrategy,
RegistrySerializer.IdResolver<T> idResolver,
Comparator<T> comparator)
Creates a new registry serializer
|
RegistrySerializer(StreamBasedObjectsAccess objectsAccess,
com.cedarsoft.serialization.Serializer<T,O,I> serializer,
RegistrySerializer.IdResolver<T> idResolver)
Deprecated.
|
RegistrySerializer(StreamBasedObjectsAccess objectsAccess,
com.cedarsoft.serialization.Serializer<T,O,I> serializer,
RegistrySerializer.IdResolver<T> idResolver,
Comparator<T> comparator)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
R |
createConnectedRegistry(com.cedarsoft.registry.RegistryFactory<T,? extends R> factory)
Creates a connected registry
|
List<? extends T> |
deserialize() |
Comparator<T> |
getComparator() |
protected String |
getId(T object) |
RegistrySerializer.IdResolver<T> |
getIdResolver() |
com.cedarsoft.serialization.Serializer<T,O,I> |
getSerializer()
Deprecated.
|
RegistrySerializingStrategy<T> |
getSerializingStrategy() |
void |
remove(T object) |
void |
serialize(T object)
Serializes an object
|
void |
update(T object) |
@Deprecated public RegistrySerializer(StreamBasedObjectsAccess objectsAccess, @Nonnull com.cedarsoft.serialization.Serializer<T,O,I> serializer, @Nonnull RegistrySerializer.IdResolver<T> idResolver)
objectsAccess - the objects accessserializer - the serializeridResolver - the id resolver@Deprecated public RegistrySerializer(@Nonnull StreamBasedObjectsAccess objectsAccess, @Nonnull com.cedarsoft.serialization.Serializer<T,O,I> serializer, @Nonnull RegistrySerializer.IdResolver<T> idResolver, @Nullable Comparator<T> comparator)
objectsAccess - the objects accessserializer - the serializeridResolver - the id resolvercomparator - the (optional) comparatorpublic RegistrySerializer(@Nonnull RegistrySerializingStrategy<T> serializingStrategy, @Nonnull RegistrySerializer.IdResolver<T> idResolver)
serializingStrategy - the serializing strategyidResolver - the id resolverpublic RegistrySerializer(@Nonnull RegistrySerializingStrategy<T> serializingStrategy, @Nonnull RegistrySerializer.IdResolver<T> idResolver, @Nullable Comparator<T> comparator)
serializingStrategy - the serializer strategyidResolver - the id resolvercomparator - the (optional) comparator@Nonnull public List<? extends T> deserialize() throws IOException
IOExceptionpublic void serialize(@Nonnull T object) throws com.cedarsoft.exceptions.StillContainedException, IOException
object - the objectcom.cedarsoft.exceptions.StillContainedExceptionIOExceptionpublic void update(@Nonnull T object) throws com.cedarsoft.serialization.NotFoundException, IOException
com.cedarsoft.serialization.NotFoundExceptionIOExceptionpublic void remove(@Nonnull T object) throws com.cedarsoft.serialization.NotFoundException, IOException
com.cedarsoft.serialization.NotFoundExceptionIOException@Nonnull public R createConnectedRegistry(@Nonnull com.cedarsoft.registry.RegistryFactory<T,? extends R> factory) throws IOException
factory - the factory used to create the registryIOException - if there is an io problem@Deprecated @Nonnull public com.cedarsoft.serialization.Serializer<T,O,I> getSerializer()
@Nonnull public RegistrySerializingStrategy<T> getSerializingStrategy()
@Nonnull public RegistrySerializer.IdResolver<T> getIdResolver()
@Nullable public Comparator<T> getComparator()
Copyright © 2007–2016 cedarsoft GmbH. All rights reserved.