com.northconcepts.datapipeline.core
Class Record

java.lang.Object
  extended by com.northconcepts.datapipeline.core.Record
All Implemented Interfaces:
Session, Cloneable, Comparable<Record>

public final class Record
extends Object
implements Cloneable, Comparable<Record>, Session


Nested Class Summary
static class Record.State
           
 
Nested classes/interfaces inherited from interface com.northconcepts.datapipeline.core.Session
Session.SessionImpl
 
Constructor Summary
Record()
           
Record(FieldList fieldNames)
          Creates a new record with the specified field names.
Record(Record record)
          Creates a new record by copying the fields from another.
Record(String... fieldNames)
          Creates a new record with the specified field names.
 
Method Summary
 Field addField()
           
 Object clone()
           
 int compareTo(Record o)
           
 int compareTo(Record o, RecordComparator comparator)
           
 boolean containsField(String fieldName)
           
 boolean containsSessionProperty(String name)
           
 void copyFrom(Record record)
           
 void copyFrom(Record record, boolean overwriteFields)
           
 void copySessionPropertiesFrom(Session session)
           
 void delete()
           
 boolean equals(Object o)
           
 boolean equals(Record o, RecordComparator comparator)
           
 Record excludeFields(FieldList fields)
           
 Record excludeFields(Set<String> fields)
           
 Field getField(int index)
           
 Field getField(int index, boolean createField)
           
 Field getField(String fieldName)
           
 Field getField(String fieldName, boolean createField)
           
 int getFieldCount()
           
 List<String> getFieldNames()
           
 List<FieldType> getFieldTypes()
           
 List<FieldType> getFieldTypes(FieldList fieldList)
           
 Object getSessionProperty(String name)
           
 long getSizeInBytes()
           
 long getSizeInBytesOfFieldNames()
           
 Record.State getState()
           
 List<?> getValues()
           
 List<?> getValues(FieldList fieldList)
           
 int hashCode()
           
 int hashCode(FieldList fieldList)
           
protected  int indexOfField(Field field)
           
 int indexOfField(String fieldName, boolean throwExceptionOnFailure)
           
 boolean isDeleted()
           
 void moveField(int oldIndex, int newIndex)
           
 void moveField(String columnName, int newIndex)
           
 Field removeField(int index)
           
 Field removeField(String columnName)
           
 Record selectFields(FieldList fields)
           
 void setAlive()
           
 void setSessionProperty(String name, Object value)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Record

public Record(Record record)
Creates a new record by copying the fields from another.

Parameters:
record - the record to copy from.

Record

public Record()

Record

public Record(String... fieldNames)
Creates a new record with the specified field names.

Parameters:
fieldNames -

Record

public Record(FieldList fieldNames)
Creates a new record with the specified field names.

Parameters:
fieldNames -
Method Detail

copyFrom

public void copyFrom(Record record,
                     boolean overwriteFields)

copyFrom

public void copyFrom(Record record)

clone

public Object clone()
Overrides:
clone in class Object

getState

public Record.State getState()

isDeleted

public boolean isDeleted()

setAlive

public void setAlive()

delete

public void delete()

getField

public Field getField(int index)

getField

public Field getField(int index,
                      boolean createField)

getField

public Field getField(String fieldName)

getField

public Field getField(String fieldName,
                      boolean createField)

getFieldCount

public int getFieldCount()

addField

public Field addField()

getFieldNames

public List<String> getFieldNames()

getFieldTypes

public List<FieldType> getFieldTypes(FieldList fieldList)

getFieldTypes

public List<FieldType> getFieldTypes()

getValues

public List<?> getValues(FieldList fieldList)

getValues

public List<?> getValues()

compareTo

public int compareTo(Record o)
Specified by:
compareTo in interface Comparable<Record>

compareTo

public int compareTo(Record o,
                     RecordComparator comparator)

equals

public boolean equals(Object o)
Overrides:
equals in class Object

equals

public boolean equals(Record o,
                      RecordComparator comparator)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

hashCode

public int hashCode(FieldList fieldList)

indexOfField

protected int indexOfField(Field field)

indexOfField

public int indexOfField(String fieldName,
                        boolean throwExceptionOnFailure)

containsField

public boolean containsField(String fieldName)

removeField

public Field removeField(int index)

removeField

public Field removeField(String columnName)

moveField

public void moveField(int oldIndex,
                      int newIndex)

moveField

public void moveField(String columnName,
                      int newIndex)

selectFields

public Record selectFields(FieldList fields)

excludeFields

public Record excludeFields(FieldList fields)

excludeFields

public Record excludeFields(Set<String> fields)

getSizeInBytesOfFieldNames

public long getSizeInBytesOfFieldNames()

getSizeInBytes

public long getSizeInBytes()

toString

public String toString()
Overrides:
toString in class Object

containsSessionProperty

public boolean containsSessionProperty(String name)
Specified by:
containsSessionProperty in interface Session

copySessionPropertiesFrom

public void copySessionPropertiesFrom(Session session)
Specified by:
copySessionPropertiesFrom in interface Session

getSessionProperty

public Object getSessionProperty(String name)
Specified by:
getSessionProperty in interface Session

setSessionProperty

public void setSessionProperty(String name,
                               Object value)
Specified by:
setSessionProperty in interface Session


Copyright (c) 2007-2012 North Concepts Inc. All Rights Reserved.