org.jminor.framework.tools.generator
Class EntityGeneratorModel
java.lang.Object
org.jminor.framework.tools.generator.EntityGeneratorModel
public final class EntityGeneratorModel
- extends Object
A model class for generating entity definitions.
- See Also:
EntityGeneratorPanel
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EntityGeneratorModel
public EntityGeneratorModel(User user,
String schema)
throws ClassNotFoundException,
SQLException
- Instantiates a new EntityGeneratorModel.
- Parameters:
user
- the userschema
- the schema name
- Throws:
ClassNotFoundException
- in case the JDBC driver class was not found on the classpath
SQLException
- in case of an exception while connecting to the database
EntityGeneratorModel
public EntityGeneratorModel(Database database,
User user,
String schema)
throws ClassNotFoundException,
SQLException
- Instantiates a new EntityGeneratorModel.
- Parameters:
database
- the databaseuser
- the userschema
- the schema name
- Throws:
ClassNotFoundException
- in case the JDBC driver class was not found on the classpath
SQLException
- in case of an exception while connecting to the database
getTableModel
public AbstractFilteredTableModel<EntityGeneratorModel.Table,Integer> getTableModel()
- Returns:
- a table model containing the tables from the generator schema
getDocument
public Document getDocument()
- Returns:
- the text document containing the entity definitions of the selected tables
getDocumentText
public String getDocumentText()
- Returns:
- the text from the entity definition document
addRefreshStartedListener
public void addRefreshStartedListener(ActionListener listener)
- Parameters:
listener
- a listener notified each time a refresh has started
removeRefreshStartedListener
public void removeRefreshStartedListener(ActionListener listener)
- Parameters:
listener
- the listener to remove
addRefreshEndedListener
public void addRefreshEndedListener(ActionListener listener)
- Parameters:
listener
- a listener notified each time a refresh has ended
removeRefreshEndedListener
public void removeRefreshEndedListener(ActionListener listener)
- Parameters:
listener
- the listener to remove
exit
public void exit()
- Closes the connection to the database