net.sf.jsefa.common.mapping
Class TypeMappingRegistry<D>

java.lang.Object
  extended by net.sf.jsefa.common.mapping.TypeMappingRegistry<D>
Type Parameters:
D - the type of the data type name.
Direct Known Subclasses:
HierarchicalTypeMappingRegistry, RbfTypeMappingRegistry

public abstract class TypeMappingRegistry<D>
extends Object

A registry for TypeMappings. It provides the registration of TypeMappings under their respective data type name and the retrieval of them given their data type name.

It is thread-safe and all subclasses should be thread-safe, too.

Author:
Norman Lahme-Huetig

Constructor Summary
  TypeMappingRegistry()
          Constructs a new TypeMappingRegistry.
protected TypeMappingRegistry(TypeMappingRegistry<D> other)
          Constructs a new TypeMappingRegistry as a copy of the given one.
 
Method Summary
abstract  TypeMappingRegistry<D> createCopy()
          Creates a copy of this TypeMappingRegistry.
 TypeMapping<D> get(D dataTypeName)
          Returns the type mapping registered under the given data type name.
 void register(TypeMapping<D> typeMapping)
          Registers the given type mapping under its data type name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeMappingRegistry

public TypeMappingRegistry()
Constructs a new TypeMappingRegistry.


TypeMappingRegistry

protected TypeMappingRegistry(TypeMappingRegistry<D> other)
Constructs a new TypeMappingRegistry as a copy of the given one.

Parameters:
other - the registry to copy
Method Detail

register

public final void register(TypeMapping<D> typeMapping)
Registers the given type mapping under its data type name.

Parameters:
typeMapping - the type mapping

get

public final TypeMapping<D> get(D dataTypeName)
Returns the type mapping registered under the given data type name.

Parameters:
dataTypeName - the data type name
Returns:
the type mapping

createCopy

public abstract TypeMappingRegistry<D> createCopy()
Creates a copy of this TypeMappingRegistry.

Returns:
a copy of this TypeMappingRegistry


Copyright © 2014. All rights reserved.