org.databene.platform.db
Class QueryLongGenerator

java.lang.Object
  extended by org.databene.benerator.util.AbstractGenerator<P>
      extended by org.databene.benerator.wrapper.GeneratorWrapper<E,E>
          extended by org.databene.benerator.wrapper.GeneratorProxy<E>
              extended by org.databene.platform.db.QueryGenerator<java.lang.Long>
                  extended by org.databene.platform.db.QueryLongGenerator
All Implemented Interfaces:
java.io.Closeable, Generator<java.lang.Long>, org.databene.commons.Resettable, org.databene.commons.ThreadAware

public class QueryLongGenerator
extends QueryGenerator<java.lang.Long>

Generates Long values based on a database query.

Created at 06.07.2009 07:58:45

Since:
0.6.0
Author:
Volker Bergmann

Field Summary
 
Fields inherited from class org.databene.benerator.wrapper.GeneratorProxy
generatedType
 
Fields inherited from class org.databene.benerator.util.AbstractGenerator
context, logger, state
 
Constructor Summary
QueryLongGenerator()
           
QueryLongGenerator(java.lang.String selector, StorageSystem source)
           
 
Method Summary
 ProductWrapper<java.lang.Long> generate(ProductWrapper<java.lang.Long> wrapper)
          Returns an instance of the generic type E, using the ProductWrapper instance provided as argument.
 java.lang.Class<java.lang.Long> getGeneratedType()
          Declares the type of the objects returned by the generate() method.
 
Methods inherited from class org.databene.platform.db.QueryGenerator
init, setSelector, setTarget, toString
 
Methods inherited from class org.databene.benerator.wrapper.GeneratorWrapper
close, equals, generateFromSource, getSource, getSourceWrapper, hashCode, isParallelizable, isThreadSafe, reset, setSource
 
Methods inherited from class org.databene.benerator.util.AbstractGenerator
assertInitialized, assertNotInitialized, getResultWrapper, wasInitialized
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QueryLongGenerator

public QueryLongGenerator()

QueryLongGenerator

public QueryLongGenerator(java.lang.String selector,
                          StorageSystem source)
Method Detail

getGeneratedType

public java.lang.Class<java.lang.Long> getGeneratedType()
Description copied from interface: Generator
Declares the type of the objects returned by the generate() method.

Specified by:
getGeneratedType in interface Generator<java.lang.Long>
Overrides:
getGeneratedType in class GeneratorProxy<java.lang.Long>

generate

public ProductWrapper<java.lang.Long> generate(ProductWrapper<java.lang.Long> wrapper)
Description copied from interface: Generator
Returns an instance of the generic type E, using the ProductWrapper instance provided as argument. The wrapper may wrap a null value as a regular generator product. If the generator is not available (any more), it returns null instead of the ProductWrapper instance.

Specified by:
generate in interface Generator<java.lang.Long>
Overrides:
generate in class GeneratorProxy<java.lang.Long>


Copyright © 2013. All Rights Reserved.