public class DBUFactory
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID
The class' serialization version id.
|
Constructor and Description |
---|
DBUFactory() |
Modifier and Type | Method and Description |
---|---|
static <DBUTL extends DBUInterface> |
getObject(java.lang.Class<DBUTL> objcls)
Returns the database utility object for the given object class with a
null servlet or thread context. |
static <DBUTL extends DBUInterface> |
getObject(java.lang.Class<DBUTL> objcls,
FlashServletContext ctx)
Returns the database utility object for the given object class with the
given servlet or thread context.
|
static FileNameTranslator |
getTranslator()
Returns the file name translator object for the configured file name
translator class (dbutl.FileNameTranslator.class).
|
private static final long serialVersionUID
public static <DBUTL extends DBUInterface> DBUTL getObject(java.lang.Class<DBUTL> objcls)
null
servlet or thread context. Allows for properties to be defined
that indicate which class actually gets created for the class that is passed
to the method.
Example:
dbutl.MyObject.class=com.dpslink.somepackage.YourObject
If MyObject.class is passed to this method, the class actually
created would be YourObject. If no matching property exists for
MyObject.class, then MyObject would be created.
CLASSES THAT HAVE ACCESS TO A SERVLET CONTEXT SHOULD LIKELY NOT INVOKE THIS METHOD BUT SHOULD INSTEAD INVOKE A METHOD CONTAINED WITHIN THE CONTEXT.
objcls
- (Class) The class for the desired object.null
if
unable to create the requested object. If no object class is
defined in properties, the object for the supplied class is
created.public static <DBUTL extends DBUInterface> DBUTL getObject(java.lang.Class<DBUTL> objcls, FlashServletContext ctx)
Example:
dbutl.MyObject.class=com.dpslink.somepackage.YourObject
If MyObject.class is passed to this method, the class actually
created would be YourObject. If no matching property exists for
MyObject.class, then MyObject would be created.
CLASSES THAT HAVE ACCESS TO A SERVLET CONTEXT SHOULD LIKELY NOT INVOKE THIS METHOD BUT SHOULD INSTEAD INVOKE A METHOD CONTAINED WITHIN THE CONTEXT.
objcls
- (Class) The class for the desired object.ctx
- (FlashServletContext) The current servlet or thread context.null
if
unable to create the requested object. If no object class is
defined in properties, the object for the supplied class is
created.public static FileNameTranslator getTranslator()
null
if no class is configured (which is ok) or if
unable to create the object for the configured class.