if ( ! isVersionProperty && isPropertyIncluded( propertyValue, propertyName, propertyTypes[i] ) ) { if ( propertyTypes[i].isComponentType() ) { appendComponentCondition(
@Override public TypedValue[] getTypedValues(Criteria criteria, CriteriaQuery criteriaQuery) { final EntityPersister meta = criteriaQuery.getFactory().getEntityPersister( criteriaQuery.getEntityName( criteria ) ); final String[] propertyNames = meta.getPropertyNames(); final Type[] propertyTypes = meta.getPropertyTypes(); final Object[] values = meta.getPropertyValues( exampleEntity ); final List<TypedValue> list = new ArrayList<TypedValue>(); for ( int i=0; i<propertyNames.length; i++ ) { final Object value = values[i]; final Type type = propertyTypes[i]; final String name = propertyNames[i]; final boolean isVersionProperty = i == meta.getVersionProperty(); if ( ! isVersionProperty && isPropertyIncluded( value, name, type ) ) { if ( propertyTypes[i].isComponentType() ) { addComponentTypedValues( name, value, (CompositeType) type, list, criteria, criteriaQuery ); } else { addPropertyTypedValue( value, type, list ); } } } return list.toArray( new TypedValue[ list.size() ] ); }
protected void addComponentTypedValues( String path, Object component, CompositeType type, List<TypedValue> list, Criteria criteria, CriteriaQuery criteriaQuery) { if ( component != null ) { final String[] propertyNames = type.getPropertyNames(); final Type[] subtypes = type.getSubtypes(); final Object[] values = type.getPropertyValues( component, getEntityMode( criteria, criteriaQuery ) ); for ( int i=0; i<propertyNames.length; i++ ) { final Object value = values[i]; final Type subtype = subtypes[i]; final String subpath = StringHelper.qualify( path, propertyNames[i] ); if ( isPropertyIncluded( value, subpath, subtype ) ) { if ( subtype.isComponentType() ) { addComponentTypedValues( subpath, value, (CompositeType) subtype, list, criteria, criteriaQuery ); } else { addPropertyTypedValue( value, subtype, list ); } } } } }
final String subPath = StringHelper.qualify( path, propertyNames[i] ); final Object value = values[i]; if ( isPropertyIncluded( value, subPath, subtypes[i] ) ) { final Type subtype = subtypes[i]; if ( subtype.isComponentType() ) {
isPropertyIncluded( propertyValue, propertyName, propertyTypes[i] ); if (isPropertyIncluded) { if ( propertyTypes[i].isComponentType() ) {
isPropertyIncluded( propertyValue, propertyName, propertyTypes[i] ); if (isPropertyIncluded) { if ( propertyTypes[i].isComponentType() ) {
isPropertyIncluded( propertyValue, propertyName, propertyTypes[i] ); if (isPropertyIncluded) { if ( propertyTypes[i].isComponentType() ) {
public TypedValue[] getTypedValues(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException { EntityPersister meta = criteriaQuery.getFactory() .getEntityPersister( criteriaQuery.getEntityName(criteria) ); String[] propertyNames = meta.getPropertyNames(); Type[] propertyTypes = meta.getPropertyTypes(); //TODO: get all properties, not just the fetched ones! Object[] values = meta.getPropertyValues( entity ); List list = new ArrayList(); for (int i=0; i<propertyNames.length; i++) { Object value = values[i]; Type type = propertyTypes[i]; String name = propertyNames[i]; boolean isPropertyIncluded = i!=meta.getVersionProperty() && isPropertyIncluded(value, name, type); if (isPropertyIncluded) { if ( propertyTypes[i].isComponentType() ) { addComponentTypedValues(name, value, (CompositeType) type, list, criteria, criteriaQuery); } else { addPropertyTypedValue(value, type, list); } } } return (TypedValue[]) list.toArray(TYPED_VALUES); }
public TypedValue[] getTypedValues(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException { EntityPersister meta = criteriaQuery.getFactory() .getEntityPersister( criteriaQuery.getEntityName(criteria) ); String[] propertyNames = meta.getPropertyNames(); Type[] propertyTypes = meta.getPropertyTypes(); //TODO: get all properties, not just the fetched ones! Object[] values = meta.getPropertyValues( entity ); List list = new ArrayList(); for (int i=0; i<propertyNames.length; i++) { Object value = values[i]; Type type = propertyTypes[i]; String name = propertyNames[i]; boolean isPropertyIncluded = i!=meta.getVersionProperty() && isPropertyIncluded(value, name, type); if (isPropertyIncluded) { if ( propertyTypes[i].isComponentType() ) { addComponentTypedValues(name, value, (CompositeType) type, list, criteria, criteriaQuery); } else { addPropertyTypedValue(value, type, list); } } } return (TypedValue[]) list.toArray(TYPED_VALUES); }
public TypedValue[] getTypedValues(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException { EntityPersister meta = criteriaQuery.getFactory() .getEntityPersister( criteriaQuery.getEntityName(criteria) ); String[] propertyNames = meta.getPropertyNames(); Type[] propertyTypes = meta.getPropertyTypes(); //TODO: get all properties, not just the fetched ones! Object[] values = meta.getPropertyValues( entity, getEntityMode(criteria, criteriaQuery) ); List list = new ArrayList(); for (int i=0; i<propertyNames.length; i++) { Object value = values[i]; Type type = propertyTypes[i]; String name = propertyNames[i]; boolean isPropertyIncluded = i!=meta.getVersionProperty() && isPropertyIncluded(value, name, type); if (isPropertyIncluded) { if ( propertyTypes[i].isComponentType() ) { addComponentTypedValues(name, value, (AbstractComponentType) type, list, criteria, criteriaQuery); } else { addPropertyTypedValue(value, type, list); } } } return (TypedValue[]) list.toArray(TYPED_VALUES); }
protected void addComponentTypedValues( String path, Object component, CompositeType type, List list, Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException { if (component!=null) { String[] propertyNames = type.getPropertyNames(); Type[] subtypes = type.getSubtypes(); Object[] values = type.getPropertyValues( component, getEntityMode(criteria, criteriaQuery) ); for (int i=0; i<propertyNames.length; i++) { Object value = values[i]; Type subtype = subtypes[i]; String subpath = StringHelper.qualify( path, propertyNames[i] ); if ( isPropertyIncluded(value, subpath, subtype) ) { if ( subtype.isComponentType() ) { addComponentTypedValues(subpath, value, (CompositeType) subtype, list, criteria, criteriaQuery); } else { addPropertyTypedValue(value, subtype, list); } } } } }
protected void addComponentTypedValues( String path, Object component, AbstractComponentType type, List list, Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException { if (component!=null) { String[] propertyNames = type.getPropertyNames(); Type[] subtypes = type.getSubtypes(); Object[] values = type.getPropertyValues( component, getEntityMode(criteria, criteriaQuery) ); for (int i=0; i<propertyNames.length; i++) { Object value = values[i]; Type subtype = subtypes[i]; String subpath = StringHelper.qualify( path, propertyNames[i] ); if ( isPropertyIncluded(value, subpath, subtype) ) { if ( subtype.isComponentType() ) { addComponentTypedValues(subpath, value, (AbstractComponentType) subtype, list, criteria, criteriaQuery); } else { addPropertyTypedValue(value, subtype, list); } } } } }
protected void addComponentTypedValues( String path, Object component, CompositeType type, List list, Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException { if (component!=null) { String[] propertyNames = type.getPropertyNames(); Type[] subtypes = type.getSubtypes(); Object[] values = type.getPropertyValues( component, getEntityMode(criteria, criteriaQuery) ); for (int i=0; i<propertyNames.length; i++) { Object value = values[i]; Type subtype = subtypes[i]; String subpath = StringHelper.qualify( path, propertyNames[i] ); if ( isPropertyIncluded(value, subpath, subtype) ) { if ( subtype.isComponentType() ) { addComponentTypedValues(subpath, value, (CompositeType) subtype, list, criteria, criteriaQuery); } else { addPropertyTypedValue(value, subtype, list); } } } } }
String subpath = StringHelper.qualify( path, propertyNames[i] ); Object value = values[i]; if ( isPropertyIncluded( value, subpath, subtypes[i] ) ) { Type subtype = subtypes[i]; if ( subtype.isComponentType() ) {
String subpath = StringHelper.qualify( path, propertyNames[i] ); Object value = values[i]; if ( isPropertyIncluded( value, subpath, subtypes[i] ) ) { Type subtype = subtypes[i]; if ( subtype.isComponentType() ) {
String subpath = StringHelper.qualify( path, propertyNames[i] ); Object value = values[i]; if ( isPropertyIncluded( value, subpath, subtypes[i] ) ) { Type subtype = subtypes[i]; if ( subtype.isComponentType() ) {