本文整理了Java中org.hibernate.cfg.Settings.isCommentsEnabled()
方法的一些代码示例,展示了Settings.isCommentsEnabled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Settings.isCommentsEnabled()
方法的具体详情如下:
包路径:org.hibernate.cfg.Settings
类名称:Settings
方法名:isCommentsEnabled
暂无
代码示例来源:origin: hibernate/hibernate-orm
if ( getFactory().getSettings().isCommentsEnabled() ) {
select.setComment( "load collection " + collectionPersister.getRole() );
代码示例来源:origin: hibernate/hibernate-orm
if ( getFactory().getSettings().isCommentsEnabled() ) {
select.setComment( "load " + getEntityName() );
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate
/**
* Modify the SQL, adding lock hints and comments, if necessary
*/
protected String preprocessSQL(String sql, QueryParameters parameters, Dialect dialect)
throws HibernateException {
sql = applyLocks( sql, parameters.getLockOptions(), dialect );
return getFactory().getSettings().isCommentsEnabled() ?
prependComment( sql, parameters ) : sql;
}
代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all
/**
* Modify the SQL, adding lock hints and comments, if necessary
*/
protected String preprocessSQL(String sql, QueryParameters parameters, Dialect dialect)
throws HibernateException {
sql = applyLocks( sql, parameters.getLockModes(), dialect );
return getFactory().getSettings().isCommentsEnabled() ?
prependComment( sql, parameters ) : sql;
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core
/**
* Modify the SQL, adding lock hints and comments, if necessary
*/
protected String preprocessSQL(String sql, QueryParameters parameters, Dialect dialect)
throws HibernateException {
sql = applyLocks( sql, parameters.getLockOptions(), dialect );
return getFactory().getSettings().isCommentsEnabled() ?
prependComment( sql, parameters ) : sql;
}
代码示例来源:origin: hibernate/hibernate
/**
* Modify the SQL, adding lock hints and comments, if necessary
*/
protected String preprocessSQL(String sql, QueryParameters parameters, Dialect dialect)
throws HibernateException {
sql = applyLocks( sql, parameters.getLockModes(), dialect );
return getFactory().getSettings().isCommentsEnabled() ?
prependComment( sql, parameters ) : sql;
}
代码示例来源:origin: hibernate/hibernate
/**
* Generate the SQL DELETE that deletes all rows
*/
protected String generateDeleteString() {
Delete delete = new Delete()
.setTableName( qualifiedTableName )
.setPrimaryKeyColumnNames( keyColumnNames );
if ( hasWhere ) delete.setWhere( sqlWhereString );
if ( getFactory().getSettings().isCommentsEnabled() ) {
delete.setComment( "delete collection " + getRole() );
}
return delete.toStatementString();
}
代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all
/**
* Generate the SQL DELETE that deletes all rows
*/
protected String generateDeleteString() {
Delete delete = new Delete()
.setTableName( qualifiedTableName )
.setPrimaryKeyColumnNames( keyColumnNames );
if ( hasWhere ) delete.setWhere( sqlWhereString );
if ( getFactory().getSettings().isCommentsEnabled() ) {
delete.setComment( "delete collection " + getRole() );
}
return delete.toStatementString();
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate
/**
* Generate the SQL DELETE that deletes all rows
*/
@Override
protected String generateDeleteString() {
Delete delete = new Delete()
.setTableName( qualifiedTableName )
.addPrimaryKeyColumns( keyColumnNames );
if ( hasWhere ) delete.setWhere( sqlWhereString );
if ( getFactory().getSettings().isCommentsEnabled() ) {
delete.setComment( "delete collection " + getRole() );
}
return delete.toStatementString();
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core
/**
* Generate the SQL DELETE that deletes all rows
*/
@Override
protected String generateDeleteString() {
Delete delete = new Delete()
.setTableName( qualifiedTableName )
.addPrimaryKeyColumns( keyColumnNames );
if ( hasWhere ) delete.setWhere( sqlWhereString );
if ( getFactory().getSettings().isCommentsEnabled() ) {
delete.setComment( "delete collection " + getRole() );
}
return delete.toStatementString();
}
代码示例来源:origin: hibernate/hibernate
/**
* Generate the SQL that deletes a row by id (and version)
*/
protected String generateDeleteString(int j) {
Delete delete = new Delete()
.setTableName( getTableName( j ) )
.setPrimaryKeyColumnNames( getKeyColumns( j ) );
if ( j == 0 ) delete.setVersionColumnName( getVersionColumnName() );
if ( getFactory().getSettings().isCommentsEnabled() ) {
delete.setComment( "delete " + getEntityName() );
}
return delete.toStatementString();
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate
protected String generateLockString() {
SessionFactoryImplementor factory = lockable.getFactory();
Update update = new Update( factory.getDialect() );
update.setTableName( lockable.getRootTableName() );
update.addPrimaryKeyColumns( lockable.getRootTableIdentifierColumnNames() );
update.setVersionColumnName( lockable.getVersionColumnName() );
update.addColumn( lockable.getVersionColumnName() );
if ( factory.getSettings().isCommentsEnabled() ) {
update.setComment( lockMode + " lock " + lockable.getEntityName() );
}
return update.toStatementString();
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate
protected String generateLockString() {
SessionFactoryImplementor factory = lockable.getFactory();
Update update = new Update( factory.getDialect() );
update.setTableName( lockable.getRootTableName() );
update.addPrimaryKeyColumns( lockable.getRootTableIdentifierColumnNames() );
update.setVersionColumnName( lockable.getVersionColumnName() );
update.addColumn( lockable.getVersionColumnName() );
if ( factory.getSettings().isCommentsEnabled() ) {
update.setComment( lockMode + " lock " + lockable.getEntityName() );
}
return update.toStatementString();
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core
private String generateVersionIncrementUpdateString() {
Update update = new Update( getFactory().getDialect() );
update.setTableName( getTableName( 0 ) );
if ( getFactory().getSettings().isCommentsEnabled() ) {
update.setComment( "forced version increment" );
}
update.addColumn( getVersionColumnName() );
update.addPrimaryKeyColumns( getIdentifierColumnNames() );
update.setVersionColumnName( getVersionColumnName() );
return update.toStatementString();
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate
protected String generateLockString() {
SessionFactoryImplementor factory = lockable.getFactory();
Update update = new Update( factory.getDialect() );
update.setTableName( lockable.getRootTableName() );
update.addPrimaryKeyColumns( lockable.getRootTableIdentifierColumnNames() );
update.setVersionColumnName( lockable.getVersionColumnName() );
update.addColumn( lockable.getVersionColumnName() );
if ( factory.getSettings().isCommentsEnabled() ) {
update.setComment( lockMode + " lock " + lockable.getEntityName() );
}
return update.toStatementString();
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core
protected String generateLockString() {
SessionFactoryImplementor factory = lockable.getFactory();
Update update = new Update( factory.getDialect() );
update.setTableName( lockable.getRootTableName() );
update.addPrimaryKeyColumns( lockable.getRootTableIdentifierColumnNames() );
update.setVersionColumnName( lockable.getVersionColumnName() );
update.addColumn( lockable.getVersionColumnName() );
if ( factory.getSettings().isCommentsEnabled() ) {
update.setComment( lockMode + " lock " + lockable.getEntityName() );
}
return update.toStatementString();
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core
protected String generateLockString() {
SessionFactoryImplementor factory = lockable.getFactory();
Update update = new Update( factory.getDialect() );
update.setTableName( lockable.getRootTableName() );
update.addPrimaryKeyColumns( lockable.getRootTableIdentifierColumnNames() );
update.setVersionColumnName( lockable.getVersionColumnName() );
update.addColumn( lockable.getVersionColumnName() );
if ( factory.getSettings().isCommentsEnabled() ) {
update.setComment( lockMode + " lock " + lockable.getEntityName() );
}
return update.toStatementString();
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate
private String generateVersionIncrementUpdateString() {
Update update = new Update( getFactory().getDialect() );
update.setTableName( getTableName( 0 ) );
if ( getFactory().getSettings().isCommentsEnabled() ) {
update.setComment( "forced version increment" );
}
update.addColumn( getVersionColumnName() );
update.addPrimaryKeyColumns( getIdentifierColumnNames() );
update.setVersionColumnName( getVersionColumnName() );
return update.toStatementString();
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core
protected String generateLockString() {
SessionFactoryImplementor factory = lockable.getFactory();
Update update = new Update( factory.getDialect() );
update.setTableName( lockable.getRootTableName() );
update.addPrimaryKeyColumns( lockable.getRootTableIdentifierColumnNames() );
update.setVersionColumnName( lockable.getVersionColumnName() );
update.addColumn( lockable.getVersionColumnName() );
if ( factory.getSettings().isCommentsEnabled() ) {
update.setComment( lockMode + " lock " + lockable.getEntityName() );
}
return update.toStatementString();
}
代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all
protected String generateLockString() {
SessionFactoryImplementor factory = lockable.getFactory();
Update update = new Update( factory.getDialect() );
update.setTableName( lockable.getRootTableName() );
update.setPrimaryKeyColumnNames( lockable.getRootTableIdentifierColumnNames() );
update.setVersionColumnName( lockable.getVersionColumnName() );
update.addColumn( lockable.getVersionColumnName() );
if ( factory.getSettings().isCommentsEnabled() ) {
update.setComment( lockMode + " lock " + lockable.getEntityName() );
}
return update.toStatementString();
}
内容来源于网络,如有侵权,请联系作者删除!