com.northconcepts.datapipeline.javabean
Class JavaBeanReader

java.lang.Object
  extended by com.northconcepts.datapipeline.core.DataEndpoint
      extended by com.northconcepts.datapipeline.core.DataReader
          extended by com.northconcepts.datapipeline.core.ProxyReader
              extended by com.northconcepts.datapipeline.javabean.JavaBeanReader

public class JavaBeanReader
extends ProxyReader

Obtains records from an object using bean introspection and reflection. See the Read from Java beans example.

JavaBeanReader's addField(String, String), addField(String, String, boolean), and addRecordBreak(String) methods use a subset of the XPath 1.0 location paths notation to identify field values and demarcate records.

Axis Specifiers

Axis Abbreviated Syntax Supported Examples
ancestor      
ancestor-or-self      
attribute @   @lang or attribute::lang
child   yes title or child::title
descendant   yes  
descendant-or-self // yes //book or /descendant-or-self::book/
following      
following-sibling      
namespace      
parent ..    
preceding      
preceding-sibling      
self . yes  

Node Tests


Predicates


Functions and Operators


Nested Class Summary
 
Nested classes/interfaces inherited from class com.northconcepts.datapipeline.core.DataEndpoint
DataEndpoint.State
 
Field Summary
 
Fields inherited from class com.northconcepts.datapipeline.core.DataEndpoint
BUFFER_SIZE, log
 
Constructor Summary
JavaBeanReader(String name, Object javabean)
           
 
Method Summary
 JavaBeanReader addField(String name, String locationPathAsString)
           
 JavaBeanReader addField(String name, String locationPathAsString, boolean cascadeValues)
           
 JavaBeanReader addRecordBreak(String locationPathAsString)
           
 
Methods inherited from class com.northconcepts.datapipeline.core.ProxyReader
addExceptionProperties, available, close, getNestedReader, interceptRecord, open, readImpl, setNestedDataReader, setNestedDataReader
 
Methods inherited from class com.northconcepts.datapipeline.core.DataReader
getBufferSize, getRootReader, peek, pop, push, read, skip
 
Methods inherited from class com.northconcepts.datapipeline.core.DataEndpoint
assertNotOpened, assertOpened, decrementRecordCount, exception, exception, exception, finalize, getDescription, getRecordCount, getRecordCountAsBigInteger, getRecordCountAsString, getState, incrementRecordCount, isClosed, isOpen, isRecordCountBigInteger, resetRecordCount, setDescription, toString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JavaBeanReader

public JavaBeanReader(String name,
                      Object javabean)
Method Detail

addRecordBreak

public JavaBeanReader addRecordBreak(String locationPathAsString)

addField

public JavaBeanReader addField(String name,
                               String locationPathAsString,
                               boolean cascadeValues)

addField

public JavaBeanReader addField(String name,
                               String locationPathAsString)


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