索引
- PersistentCategoryKeyValueContent
- ITreeContent
- ItemContent
- InstantaneousTreeContent
- ICodedTreeContent
- IKeyValueContent
- InstantaneousCodedTreeContent
- InstantaneousKeyValueContent
- IGlobalizationContent
- EntityUtil
- EntityStore
- ICategoryTreeContent
- ICategoryKeyValueContent
- ICodedCategoryTreeContent
- EntityJoin
- EntityCapsule
- CacheKeyValueContent
- CacheTreeContent
- ClassContent
- ProxySupport
- CacheCodedTreeContent
- Business
- ValidationSupport
- Validation
- IFinallyAspect
- Intercept
- InvokeContext
- IProxyLoader
- ProxyFactory
- IAspect
- IAroundAspect
- FinallyAspectSupport
- AroundAspectSupport
- AOPUnknownBreak
- AOPBreak
- AOPTransactionBreak
- GridView
- JSONOut
- Galleria
- package-frame
- package-summary
- package-tree
- package-use
- LoginSessionListener
- ApplicationContextListener
- TransactionFilter
- FileUploader.FileUploaderStatus
- FileUploader
- CharacterEncodingFilter
- ImageRedirectFilter
- FileUploader.FileUploaderListener
- PrintWriterDecorator
- IFormatter
- TokenPool
- HttpServletResponseDecorator
- HttpServletRequestDecorator
- ICryptography
- DynamicSecret
- CryptographySupport
- OrmTransactionContext
- OrmPersistenceFactory
- OrmPersistenceCollection
- CryptographyFactory
- OrmContexts
- OrmDatabaseTransaction
- OrmDefinitionContext
- OrmManipulationQueryContext
- OrmPersistence
- IOrmPersistence
- IOrmManipulationQuery
- IOrmTransaction
- Order
- OrmConstant
- IOrmDefinition
- DatabaseHelperSupport
- Entity
- FieldProperty
- Fields
- XMLFormatter
- SetList
- AggregateField
- Condition
- DatabaseHelper
- JSONFormatter
- ISetList
- MapList
- Names
- NameValue
- ServiceRouter
- StreamView
- TextView
- XMLView
- IMapList
- ServiceController
- RouterSupport
- Router
- RedirectView
- MVCRenderException
- MVCNotFoundException
- MVCInternalException
- JSPRouter
- JSPView
- Model
- MVCException
- MVCInstantiationException
- IModel
- IRouter
- IView
- JSONView
- JSPController
- ImageView
- IController
- HTMLView
- ForwardView
- Controller
- MailSender
- RandomGenerator
- ReflectionUtil
- ReservedWord
- QRCode
- LoggerSupport
- ChinesePinYin
- HttpExecuter
- IdCardValidator
- ImageValidateCode
- User32.RECT
- User32.SIZE
- KCLInformation
- IAppender
- Logger
- User32.POINT
- User32
- Identify
- FacadeDirectory
- FacadeIO
- TextReader
- TextWriter
- LocalizationLanguage
- Convert
- Comments
- WinFormInstallationBuilder
- WebFormInstallationBuilder
- PersistentTreeContent
- ServiceBusiness
- TreeContent
- CallingOnly
- CodeBuilder
- PersistentCategoryTreeContent
- PersistentCodedCategoryTreeContent
- PersistentCodedTreeContent
- PersistentGlobalizationContent
- PersistentKeyValueContent
- XMLDocumentEx
- WxOAuthAdapter
- WxPayAdapter
- WxSupport
- KCLConfig
- XMLDocument
- WxOAthAdapter
- WxAdapterSupport
- WxBasicAdapter
- WxMenuAdapter
- WxMessageDispatcher
- IWxReceivedListener
- TreeNode
- TreeLeaf
- Tree
- Train
- IWxEventListener
- ITreeNode
- MapQueue
- DateTime
- Forest
- ICache
- IMapQueue
- ThreadUnsafe
- UnimplementedException
- Untested
- ThreadSafe
- Cache
- MultiThreadUnitTest
- Debugger
- IUnitTest
- UnitTest
- Tested
- UploadView
- TreeView
- Paging
- StringHelper
- RichText
- Video
- Music
- ListView
- Label
- KCLTag
com.knots.kcl.orm
Class DatabaseHelper
java.lang.Object com.knots.kcl.orm.DatabaseHelper
public class DatabaseHelper
- extends java.lang.Object
Database Helper
Field Summary | |
---|---|
static int | CMD_PARAMETER |
static int | CMD_PROCEDURE |
static int | CMD_TEXT |
static int | HS_NORMAL |
static int | HS_TRANSACTION |
static Logger | logger |
Constructor Summary | |
---|---|
DatabaseHelper(java.lang.String classTypeName, java.lang.String connectionUrl, java.lang.String userName, java.lang.String password) |
Method Summary | |
---|---|
void | abortTransaction() Abort the transaction. |
void | beginTransaction() Start the transaction. |
void | endTransaction() Finish the transaction. |
boolean | executeNonQuery(int cmdType, java.lang.String cmdText, java.lang.Object... cmdParams) |
Entity[] | executeQuery(int cmdType, java.lang.String cmdText, java.lang.Object... cmdParams) |
void | finalize() |
NameValue | getColumns(java.lang.String tableName) Get columns for table. |
int | getConnectionState() Get connection state. |
java.lang.String | getConnectionUrl() |
java.lang.String | getPassword() |
NameValue[] | getTables() Get all tables in database. |
java.lang.String | getUserName() |
void | setConnectionUrl(java.lang.String connectionUrl) |
void | setPassword(java.lang.String password) |
void | setUserName(java.lang.String userName) |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
logger
public static final Logger logger
HS_NORMAL
public static final int HS_NORMAL
- See Also:
- Constant Field Values
HS_TRANSACTION
public static final int HS_TRANSACTION
- See Also:
- Constant Field Values
CMD_TEXT
public static final int CMD_TEXT
- See Also:
- Constant Field Values
CMD_PARAMETER
public static final int CMD_PARAMETER
- See Also:
- Constant Field Values
CMD_PROCEDURE
public static final int CMD_PROCEDURE
- See Also:
- Constant Field Values
Constructor Detail |
---|
DatabaseHelper
public DatabaseHelper(java.lang.String classTypeName, java.lang.String connectionUrl, java.lang.String userName, java.lang.String password) throws java.lang.ClassNotFoundException
- Throws:
java.lang.ClassNotFoundException
Method Detail |
---|
getUserName
public java.lang.String getUserName()
setUserName
public void setUserName(java.lang.String userName)
getPassword
public java.lang.String getPassword()
setPassword
public void setPassword(java.lang.String password)
getConnectionUrl
public java.lang.String getConnectionUrl()
setConnectionUrl
public void setConnectionUrl(java.lang.String connectionUrl)
finalize
public void finalize()
- Overrides:
finalize
in classjava.lang.Object
getConnectionState
public int getConnectionState()
- Get connection state.
- Returns:
- DatabaseHelper.HS_NORMAL for normal state or DatabaseHelper.HS_TRANSACTION for transaction state.
beginTransaction
public void beginTransaction() throws java.sql.SQLException
- Start the transaction.
- Throws:
java.sql.SQLException
abortTransaction
public void abortTransaction() throws java.sql.SQLException
- Abort the transaction.
- Throws:
java.sql.SQLException
endTransaction
public void endTransaction() throws java.sql.SQLException
- Finish the transaction.
- Throws:
java.sql.SQLException
executeNonQuery
public boolean executeNonQuery(int cmdType, java.lang.String cmdText, java.lang.Object... cmdParams) throws java.sql.SQLException
- Throws:
java.sql.SQLException
executeQuery
public Entity[] executeQuery(int cmdType, java.lang.String cmdText, java.lang.Object... cmdParams) throws java.sql.SQLException
- Throws:
java.sql.SQLException
getTables
public NameValue[] getTables() throws java.sql.SQLException
- Get all tables in database.
- Throws:
java.sql.SQLException
getColumns
public NameValue getColumns(java.lang.String tableName) throws java.sql.SQLException
- Get columns for table.
- Parameters:
tableName
- the name of table- Throws:
java.sql.SQLException