de.ispsoft.jaxme.generator
Class SchemaComplexJdbcElement

java.lang.Object
  extended byde.ispsoft.jaxme.generator.SchemaAnnotationOwner
      extended byde.ispsoft.jaxme.generator.SchemaElement
          extended byde.ispsoft.jaxme.generator.SchemaComplexElement
              extended byde.ispsoft.jaxme.generator.SchemaComplexJdbcElement

public class SchemaComplexJdbcElement
extends SchemaComplexElement

An extension of the SchemaComplexElement with additional information related to JDBC.

Author:
Jochen Wiedmann

Nested Class Summary
 
Nested classes inherited from class de.ispsoft.jaxme.generator.SchemaElement
SchemaElement.ClassExtension, SchemaElement.ImplementedInterface, SchemaElement.PieceOfJavaSource
 
Field Summary
 JdbcTable table
           
 JdbcView view
           
 
Fields inherited from class de.ispsoft.jaxme.generator.SchemaComplexElement
COMPLEX_TYPE_ALL, COMPLEX_TYPE_CHOICE, COMPLEX_TYPE_SEQUENCE
 
Constructor Summary
SchemaComplexJdbcElement(SchemaAnnotationOwner pParent)
          Creates a new instance of SchemaComplexJdbcElement
 
Method Summary
 void addSqlField(SqlField pField)
          Adds an element to the list of SQL fields.
 void clearSqlFields()
          Clears the list of SQL fields.
 java.lang.String getSelectTables()
          Returns the elements table list.
 java.util.Iterator getSqlFieldList()
          Returns an iterator to the list of SQL fields.
 JdbcTable getTable()
          Returns the elements table name.
 boolean getUseDataSource()
          Returns whether to use a DataSource.
 JdbcView getView()
          Returns the current view.
 java.lang.String getWhere()
          Returns an additional filter for the where clause.
 boolean isTable()
          Returns whether this element is based on a table.
 boolean isView()
          Returns whether this element is a view.
 void setSelectTables(java.lang.String pSelectTables)
          Sets the elements table list.
 void setTable(JdbcTable pTable)
          Sets the elements table name.
 void setUseDataSource(boolean pUseDataSource)
          Sets whether to use a DataSource.
 void setView(JdbcView pView)
          Adds a new view to the list of generated views.
 void setWhere(java.lang.String pWhere)
          Sets an additional filter for the where clause.
 
Methods inherited from class de.ispsoft.jaxme.generator.SchemaComplexElement
addAttribute, addChild, clearAttributes, clearChilds, getAttributes, getChilds, getClassName, getComplexType, getDefaultClassName, getErrorCode, getFieldType, getInstanceType, getPrefixList, hasProtectedConstructor, isAnyType, isAttribute, isComplex, setComplexType, setErrorCode, setPrefixList, setProtectedConstructor
 
Methods inherited from class de.ispsoft.jaxme.generator.SchemaElement
addClassExtension, addElementDecorator, addImplementedInterface, addJavaSource, addOption, clearClassExtensions, clearImplementedInterfaces, clearJavaSources, clearOptions, convertNameToJavaName, getAddMethodName, getAssignmentFrom, getAssignmentTo, getClassExtension, getClone, getDefaultFieldName, getDisplayName, getDOMNode, getElementDecorator, getElementDecorators, getExtendedElement, getFieldName, getGetMethodName, getImplementedInterfaces, getJavaSources, getManagerClassName, getMaxOccurs, getMinOccurs, getName, getNamespace, getNamespacePrefix, getOptions, getParent, getPrefix, getQClassName, getSchema, getSchemaType, getSetMethodName, getSuppress, getSystemId, getTypeIsExplicit, isMultiple, setAddMethodName, setClassName, setDOMNode, setExtendedElement, setFieldName, setGetMethodName, setManagerClassName, setMaxOccurs, setMinOccurs, setName, setNamespace, setNamespacePrefix, setPrefix, setSchemaType, setSetMethodName, setSuppress, setSystemId, setTypeIsExplicit
 
Methods inherited from class de.ispsoft.jaxme.generator.SchemaAnnotationOwner
getAccessors, getDocumentation, getExtendsClassName, getPackageName, setAccessors, setDocumentation, setExtendsClassName, setPackageName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

view

public JdbcView view

table

public JdbcTable table
Constructor Detail

SchemaComplexJdbcElement

public SchemaComplexJdbcElement(SchemaAnnotationOwner pParent)
Creates a new instance of SchemaComplexJdbcElement

Method Detail

getSqlFieldList

public java.util.Iterator getSqlFieldList()

Returns an iterator to the list of SQL fields.


addSqlField

public void addSqlField(SqlField pField)

Adds an element to the list of SQL fields.


clearSqlFields

public void clearSqlFields()

Clears the list of SQL fields.


getSelectTables

public java.lang.String getSelectTables()

Returns the elements table list. By default the table name is returned.


setSelectTables

public void setSelectTables(java.lang.String pSelectTables)

Sets the elements table list.


getTable

public JdbcTable getTable()

Returns the elements table name.


setTable

public void setTable(JdbcTable pTable)
              throws SchemaException

Sets the elements table name.

Throws:
SchemaException

setWhere

public void setWhere(java.lang.String pWhere)

Sets an additional filter for the where clause.


getWhere

public java.lang.String getWhere()

Returns an additional filter for the where clause.


setUseDataSource

public void setUseDataSource(boolean pUseDataSource)

Sets whether to use a DataSource. This means that the generated Manager will by default extend JMJdbcDataSourceManager and not JMJdbcManager.

See Also:
getUseDataSource()

getUseDataSource

public boolean getUseDataSource()

Returns whether to use a DataSource. This means that the generated Manager will by default extend JMJdbcDataSourceManager and not JMJdbcManager.

See Also:
setUseDataSource(boolean)

setView

public void setView(JdbcView pView)
             throws SchemaException

Adds a new view to the list of generated views.

Throws:
SchemaException

getView

public JdbcView getView()

Returns the current view.


isTable

public boolean isTable()

Returns whether this element is based on a table.


isView

public boolean isView()

Returns whether this element is a view.