org.jomc.sequences.ri
Class DefaultSequenceMapper

Package class diagram package DefaultSequenceMapper
java.lang.Object
  extended by org.jomc.sequences.ri.DefaultSequenceMapper
All Implemented Interfaces:
SequenceMapper

@Generated(value="org.jomc.tools.SourceFileProcessor 1.0",
           comments="See http://jomc.sourceforge.net/jomc/1.0/jomc-tools")
public class DefaultSequenceMapper
extends Object
implements SequenceMapper

SequenceMapper reference implementation.

Specifications

Dependencies

Messages

Version:
$Id: DefaultSequenceMapper.java 2247 2010-06-29 08:01:42Z schulte2005 $
Author:
Christian Schulte 1.0

Constructor Summary
Constructor and Description
DefaultSequenceMapper()
          Creates a new DefaultSequenceMapper instance.
 
Method Summary
Modifier and Type Method and Description
protected  void injectDate(org.jomc.sequences.Sequence s, long value)
          Sets the value of property date of a given sequence using reflection.
protected  void injectFieldValue(Object object, String fieldName, Object value)
          Sets the value of a field of a given object using reflection.
protected  void injectRevision(org.jomc.sequences.Sequence s, long value)
          Sets the value of property revision of a given sequence using reflection.
 org.jomc.sequences.model.SequenceType map(org.jomc.sequences.Sequence sequence, org.jomc.sequences.model.SequenceType sequenceType)
          Maps a Sequence instance to a SequenceType instance.
 org.jomc.sequences.Sequence map(org.jomc.sequences.model.SequenceType sequenceType, org.jomc.sequences.Sequence sequence)
          Maps a SequenceType instance to a Sequence instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSequenceMapper

@Generated(value="org.jomc.tools.SourceFileProcessor 1.0",
           comments="See http://jomc.sourceforge.net/jomc/1.0/jomc-tools")
public DefaultSequenceMapper()
Creates a new DefaultSequenceMapper instance.

Method Detail

map

public org.jomc.sequences.Sequence map(org.jomc.sequences.model.SequenceType sequenceType,
                                       org.jomc.sequences.Sequence sequence)
Description copied from interface: SequenceMapper
Maps a SequenceType instance to a Sequence instance.

Specified by:
map in interface SequenceMapper
Parameters:
sequenceType - The instance to map.
sequence - The target instance to map sequenceType to.
Returns:
sequenceType mapped to sequence.

map

public org.jomc.sequences.model.SequenceType map(org.jomc.sequences.Sequence sequence,
                                                 org.jomc.sequences.model.SequenceType sequenceType)
Description copied from interface: SequenceMapper
Maps a Sequence instance to a SequenceType instance.

Specified by:
map in interface SequenceMapper
Parameters:
sequence - The instance to map.
sequenceType - The target instance to map sequence to.
Returns:
sequence mapped to sequenceType.

injectRevision

protected void injectRevision(org.jomc.sequences.Sequence s,
                              long value)
Sets the value of property revision of a given sequence using reflection.

Parameters:
s - The sequence to update.
value - The new value for property revision.
Throws:
org.jomc.sequences.SequencesSystemException - if injecting value fails unexpectedly.

injectDate

protected void injectDate(org.jomc.sequences.Sequence s,
                          long value)
Sets the value of property date of a given sequence using reflection.

Parameters:
s - The sequence to update.
value - The new value for property date.
Throws:
org.jomc.sequences.SequencesSystemException - if injecting value fails unexpectedly.

injectFieldValue

protected void injectFieldValue(Object object,
                                String fieldName,
                                Object value)
Sets the value of a field of a given object using reflection.

Parameters:
object - The object to update.
fieldName - The name of the field to update.
value - The new value for field fieldName.
Throws:
org.jomc.sequences.SequencesSystemException - if setting value fails unexpectedly.


Copyright © 2005-2010 The JOMC Project. All Rights Reserved.