本文整理了Java中org.hibernate.mapping.Property.isBackRef()
方法的一些代码示例,展示了Property.isBackRef()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Property.isBackRef()
方法的具体详情如下:
包路径:org.hibernate.mapping.Property
类名称:Property
方法名:isBackRef
暂无
代码示例来源:origin: hibernate/hibernate-orm
private PropertyAccess buildPropertyAccess(Property mappedProperty) {
if ( mappedProperty.isBackRef() ) {
return mappedProperty.getPropertyAccessStrategy( null ).buildPropertyAccess( null, mappedProperty.getName() );
}
else {
return PropertyAccessStrategyMapImpl.INSTANCE.buildPropertyAccess( null, mappedProperty.getName() );
}
}
代码示例来源:origin: hibernate/hibernate-tools
public Property next() {
if ( backLog != null ) {
Property p = backLog;
backLog = null;
return p;
}
Property nextProperty = (Property) delegate.next();
while ( nextProperty.isBackRef() && delegate.hasNext() ) {
nextProperty = (Property) delegate.next();
}
if ( nextProperty.isBackRef() ) {
throw new NoSuchElementException();
}
return nextProperty;
}
代码示例来源:origin: org.hibernate/hibernate-tools
public boolean hasNext() {
if ( backLog!=null ) {
return true;
} else if ( delegate.hasNext() ) {
Property nextProperty = (Property) delegate.next();
while ( nextProperty.isBackRef() && delegate.hasNext() ) {
nextProperty = (Property) delegate.next();
}
if ( !nextProperty.isBackRef() ) {
backLog = nextProperty;
return true;
}
}
return false;
}
代码示例来源:origin: org.hibernate/hibernate-tools
public Property next() {
if ( backLog != null ) {
Property p = backLog;
backLog = null;
return p;
}
Property nextProperty = (Property) delegate.next();
while ( nextProperty.isBackRef() && delegate.hasNext() ) {
nextProperty = (Property) delegate.next();
}
if ( nextProperty.isBackRef() ) {
throw new NoSuchElementException();
}
return nextProperty;
}
代码示例来源:origin: hibernate/hibernate-tools
public boolean hasNext() {
if ( backLog!=null ) {
return true;
} else if ( delegate.hasNext() ) {
Property nextProperty = (Property) delegate.next();
while ( nextProperty.isBackRef() && delegate.hasNext() ) {
nextProperty = (Property) delegate.next();
}
if ( !nextProperty.isBackRef() ) {
backLog = nextProperty;
return true;
}
}
return false;
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate
private PropertyAccessor buildPropertyAccessor(Property mappedProperty) {
if ( mappedProperty.isBackRef() ) {
return mappedProperty.getPropertyAccessor(null);
}
else {
return PropertyAccessorFactory.getDynamicMapPropertyAccessor();
}
}
代码示例来源:origin: hibernate/hibernate
private PropertyAccessor buildPropertyAccessor(Property mappedProperty) {
if ( mappedProperty.isBackRef() ) {
return mappedProperty.getPropertyAccessor(null);
}
else {
return PropertyAccessorFactory.getDynamicMapPropertyAccessor();
}
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core
private PropertyAccessor buildPropertyAccessor(Property mappedProperty) {
if ( mappedProperty.isBackRef() ) {
return mappedProperty.getPropertyAccessor(null);
}
else {
return PropertyAccessorFactory.getDynamicMapPropertyAccessor();
}
}
代码示例来源:origin: org.hibernate/hibernate-tools
protected List<Property> getPropertiesForFullConstructor(PersistentClass pc) {
List<Property> result = new ArrayList<Property>();
for ( Iterator<Property> myFields = getAllPropertiesIterator(pc); myFields.hasNext() ; ) {
Property field = (Property) myFields.next();
// TODO: if(!field.isGenerated() ) ) {
if(field.equals(pc.getIdentifierProperty()) && !isAssignedIdentifier(pc, field)) {
continue; // dont add non assigned identifiers
} else if(field.equals(pc.getVersion())) {
continue; // version prop
} else if(field.isBackRef()) {
continue;
} else if(isFormula(field)) {
continue;
} else {
result.add( field );
}
}
return result;
}
代码示例来源:origin: hibernate/hibernate-tools
protected List<Property> getPropertiesForFullConstructor(PersistentClass pc) {
List<Property> result = new ArrayList<Property>();
for ( Iterator<Property> myFields = getAllPropertiesIterator(pc); myFields.hasNext() ; ) {
Property field = (Property) myFields.next();
// TODO: if(!field.isGenerated() ) ) {
if(field.equals(pc.getIdentifierProperty()) && !isAssignedIdentifier(pc, field)) {
continue; // dont add non assigned identifiers
} else if(field.equals(pc.getVersion())) {
continue; // version prop
} else if(field.isBackRef()) {
continue;
} else if(isFormula(field)) {
continue;
} else {
result.add( field );
}
}
return result;
}
代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all
@SuppressWarnings("unchecked")
private void addSubElement(Property property, ValidatableElement element) {
if ( property != null && property.isComposite() && ! property.isBackRef() ) {
Component component = (Component) property.getValue();
if ( component.isEmbedded() ) return;
PropertyAccessor accessor = PropertyAccessorFactory.getPropertyAccessor( property, EntityMode.POJO );
Getter getter = accessor.getGetter( element.clazz, property.getName() );
ClassValidator validator = new ClassValidator( getter.getReturnType() );
ValidatableElement subElement = new ValidatableElement( getter.getReturnType(), validator, getter );
Iterator properties = component.getPropertyIterator();
while ( properties.hasNext() ) {
addSubElement( (Property) properties.next(), subElement );
}
if ( subElement.getSubElements().size() != 0 || subElement.validator.hasValidationRules() ) {
element.addSubElement( subElement );
}
}
}
代码示例来源:origin: hibernate/hibernate
private PropertyAccessor buildPropertyAccessor(Property mappedProperty) {
if ( mappedProperty.isBackRef() ) {
return mappedProperty.getPropertyAccessor(null);
}
else {
return PropertyAccessorFactory.getDom4jPropertyAccessor(
mappedProperty.getNodeName(),
mappedProperty.getType(),
getEntityMetamodel().getSessionFactory()
);
}
}
代码示例来源:origin: org.hibernate/hibernate-validator-legacy
@SuppressWarnings( "unchecked" )
private void addSubElement(Property property, ValidatableElement element) {
if ( property != null && property.isComposite() && !property.isBackRef() ) {
Component component = (Component) property.getValue();
if ( component.isEmbedded() ) return;
PropertyAccessor accessor = PropertyAccessorFactory.getPropertyAccessor( property, EntityMode.POJO );
Getter getter = accessor.getGetter( element.clazz, property.getName() );
ClassValidator validator = new ClassValidator( getter.getReturnType() );
ValidatableElement subElement = new ValidatableElement( getter.getReturnType(), validator, getter );
Iterator properties = component.getPropertyIterator();
while ( properties.hasNext() ) {
addSubElement( (Property) properties.next(), subElement );
}
if ( subElement.getSubElements().size() != 0 || subElement.validator.hasValidationRules() ) {
element.addSubElement( subElement );
}
}
}
代码示例来源:origin: com.mysema.querydsl/querydsl-jpa-codegen
private void handleProperty(EntityType entityType, Class<?> cl, org.hibernate.mapping.Property p)
throws NoSuchMethodException, ClassNotFoundException {
if (p.isBackRef()) {
return;
代码示例来源:origin: com.querydsl/querydsl-jpa-codegen
private void handleProperty(EntityType entityType, Class<?> cl, org.hibernate.mapping.Property p)
throws NoSuchMethodException, ClassNotFoundException {
if (p.isBackRef()) {
return;
内容来源于网络,如有侵权,请联系作者删除!