JavaXT
|
|
Model ClassBase class for persistence models generated by the javaxt-orm library.
ConstructorsThere are no public constructors.Public MethodsStatic Methodsinit( Class c, ConnectionPool connectionPool ) returns void Used to initialize a Model and associate it with a database connection pool. This allows queries and other database metadata to be cached.
for (Jar.Entry entry : jar.getEntries()){ String name = entry.getName(); if (name.endsWith(".class")){ name = name.substring(0, name.length()-6).replace("/", "."); Class c = Class.forName(name); if (javaxt.sql.Model.class.isAssignableFrom(c)){ javaxt.sql.Model.init(c, database.getConnectionPool()); } } } init( javaxt.io.Jar jar, ConnectionPool connectionPool ) returns void Used to initialize all the Models found in a jar file and associate them with a database connection pool. This allows queries and other database metadata to be cached. getTableName( Model model ) returns String Returns the name of the table backing a given Model setSchemaName( String schemaName, Class c ) returns void Provides an option to override the default schema used by a model |