javax.persistence.metamodel.ListAttribute源码实例Demo

类javax.persistence.metamodel.ListAttribute源码实例Demo

下面列出了javax.persistence.metamodel.ListAttribute 类实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: lams   文件: AbstractManagedType.java
@Override
@SuppressWarnings({ "unchecked" })
public ListAttribute<? super X, ?> getList(String name) {
	PluralAttribute<? super X, ?, ?> attribute = getPluralAttribute( name );
	if ( attribute == null && getSupertype() != null ) {
		attribute = getSupertype().getPluralAttribute( name );
	}
	basicListCheck( attribute, name );
	return (ListAttribute<? super X, ?>) attribute;
}
 
源代码2 项目: lams   文件: AbstractManagedType.java
@Override
@SuppressWarnings("unchecked")
public ListAttribute<X, ?> getDeclaredList(String name) {
	final PluralAttribute<X,?,?> attribute = declaredPluralAttributes.get( name );
	basicListCheck( attribute, name );
	return ( ListAttribute<X, ?> ) attribute;
}
 
源代码3 项目: lams   文件: AbstractManagedType.java
@Override
@SuppressWarnings({ "unchecked" })
public <E> ListAttribute<? super X, E> getList(String name, Class<E> elementType) {
	PluralAttribute<? super X, ?, ?> attribute = declaredPluralAttributes.get( name );
	if ( attribute == null && getSupertype() != null ) {
		attribute = getSupertype().getPluralAttribute( name );
	}
	checkListElementType( attribute, name, elementType );
	return ( ListAttribute<? super X, E> ) attribute;
}
 
源代码4 项目: lams   文件: AbstractManagedType.java
@Override
@SuppressWarnings("unchecked")
public <E> ListAttribute<X, E> getDeclaredList(String name, Class<E> elementType) {
	final PluralAttribute<X,?,?> attribute = declaredPluralAttributes.get( name );
	checkListElementType( attribute, name, elementType );
	return ( ListAttribute<X, E> ) attribute;
}
 
源代码5 项目: lams   文件: ListIndexExpression.java
public ListIndexExpression(
		CriteriaBuilderImpl criteriaBuilder,
		PathImplementor origin,
		ListAttribute listAttribute) {
	super( criteriaBuilder, Integer.class );
	this.origin = origin;
	this.listAttribute = listAttribute;
}
 
源代码6 项目: lams   文件: AbstractFromImpl.java
private <Y> ListJoinImplementor<X, Y> constructJoin(ListAttribute<? super X, Y> list, JoinType jt) {
	if ( jt.equals( JoinType.RIGHT ) ) {
		throw new UnsupportedOperationException( "RIGHT JOIN not supported" );
	}

	// TODO : runtime check that the attribute in fact belongs to this From's model/bindable

	final Class<Y> attributeType = list.getBindableJavaType();
	return new ListAttributeJoin<X, Y>( criteriaBuilder(), attributeType, this, list, jt );
}
 
源代码7 项目: lams   文件: AbstractFromImpl.java
@Override
@SuppressWarnings({"unchecked"})
public <X, Y> Join<X, Y> join(String attributeName, JoinType jt) {
	if ( !canBeJoinSource() ) {
		throw illegalJoin();
	}

	if ( jt.equals( JoinType.RIGHT ) ) {
		throw new UnsupportedOperationException( "RIGHT JOIN not supported" );
	}

	final Attribute<X, ?> attribute = (Attribute<X, ?>) locateAttribute( attributeName );
	if ( attribute.isCollection() ) {
		final PluralAttribute pluralAttribute = (PluralAttribute) attribute;
		if ( PluralAttribute.CollectionType.COLLECTION.equals( pluralAttribute.getCollectionType() ) ) {
			return (Join<X, Y>) join( (CollectionAttribute) attribute, jt );
		}
		else if ( PluralAttribute.CollectionType.LIST.equals( pluralAttribute.getCollectionType() ) ) {
			return (Join<X, Y>) join( (ListAttribute) attribute, jt );
		}
		else if ( PluralAttribute.CollectionType.SET.equals( pluralAttribute.getCollectionType() ) ) {
			return (Join<X, Y>) join( (SetAttribute) attribute, jt );
		}
		else {
			return (Join<X, Y>) join( (MapAttribute) attribute, jt );
		}
	}
	else {
		return (Join<X, Y>) join( (SingularAttribute) attribute, jt );
	}
}
 
源代码8 项目: lams   文件: AbstractFromImpl.java
@Override
@SuppressWarnings({"unchecked"})
public <X, Y> ListJoin<X, Y> joinList(String attributeName, JoinType jt) {
	final Attribute<X, ?> attribute = (Attribute<X, ?>) locateAttribute( attributeName );
	if ( !attribute.isCollection() ) {
		throw new IllegalArgumentException( "Requested attribute was not a list" );
	}

	final PluralAttribute pluralAttribute = (PluralAttribute) attribute;
	if ( !PluralAttribute.CollectionType.LIST.equals( pluralAttribute.getCollectionType() ) ) {
		throw new IllegalArgumentException( "Requested attribute was not a list" );
	}

	return (ListJoin<X, Y>) join( (ListAttribute) attribute, jt );
}
 
源代码9 项目: lams   文件: ListAttributeJoin.java
public ListAttributeJoin(
		CriteriaBuilderImpl criteriaBuilder,
		Class<E> javaType,
		PathSource<O> pathSource,
		ListAttribute<? super O, E> joinAttribute,
		JoinType joinType) {
	super( criteriaBuilder, javaType, pathSource, joinAttribute, joinType );
}
 
源代码10 项目: lams   文件: ListAttributeJoin.java
@SuppressWarnings("unchecked")
public TreatedListAttributeJoin(ListAttributeJoin<O, ? super T> original, Class<T> treatAsType) {
	super(
			original.criteriaBuilder(),
			treatAsType,
			original.getPathSource(),
			(ListAttribute<? super O, T>) original.getAttribute(),
			original.getJoinType()
	);
	this.original = original;
	this.treatAsType = treatAsType;
}
 
源代码11 项目: lams   文件: AbstractManagedType.java
private void basicListCheck(PluralAttribute<? super X, ?, ?> attribute, String name) {
	checkNotNull( "ListAttribute", attribute, name );
	if ( ! ListAttribute.class.isAssignableFrom( attribute.getClass() ) ) {
		throw new IllegalArgumentException( name + " is not a ListAttribute: " + attribute.getClass() );
	}
}
 
源代码12 项目: lams   文件: ListIndexExpression.java
public ListAttribute getListAttribute() {
	return listAttribute;
}
 
源代码13 项目: lams   文件: AbstractFromImpl.java
@Override
public <Y> ListJoin<X, Y> join(ListAttribute<? super X, Y> list) {
	return join( list, DEFAULT_JOIN_TYPE );
}
 
源代码14 项目: lams   文件: ListAttributeJoin.java
@Override
public ListAttribute<? super O, E> getAttribute() {
	return (ListAttribute<? super O, E>) super.getAttribute();
}
 
源代码15 项目: lams   文件: ListAttributeJoin.java
@Override
public ListAttribute<? super O, E> getModel() {
	return getAttribute();
}
 
源代码16 项目: olingo-odata2   文件: JPAEntityTypeMock.java
@Override
public ListAttribute<X, ?> getDeclaredList(final String arg0) {
  return null;
}
 
源代码17 项目: olingo-odata2   文件: JPAEntityTypeMock.java
@Override
public <E> ListAttribute<X, E> getDeclaredList(final String arg0, final Class<E> arg1) {
  return null;
}
 
源代码18 项目: olingo-odata2   文件: JPAEntityTypeMock.java
@Override
public ListAttribute<? super X, ?> getList(final String arg0) {
  return null;
}
 
源代码19 项目: olingo-odata2   文件: JPAEntityTypeMock.java
@Override
public <E> ListAttribute<? super X, E> getList(final String arg0, final Class<E> arg1) {
  return null;
}
 
源代码20 项目: olingo-odata2   文件: JPAManagedTypeMock.java
@Override
public ListAttribute<X, ?> getDeclaredList(final String arg0) {
  return null;
}
 
源代码21 项目: olingo-odata2   文件: JPAManagedTypeMock.java
@Override
public <E> ListAttribute<X, E> getDeclaredList(final String arg0, final Class<E> arg1) {
  return null;
}
 
源代码22 项目: olingo-odata2   文件: JPAManagedTypeMock.java
@Override
public ListAttribute<? super X, ?> getList(final String arg0) {
  return null;
}
 
源代码23 项目: olingo-odata2   文件: JPAManagedTypeMock.java
@Override
public <E> ListAttribute<? super X, E> getList(final String arg0, final Class<E> arg1) {
  return null;
}
 
源代码24 项目: olingo-odata2   文件: JPAEmbeddableTypeMock.java
@Override
public ListAttribute<X, ?> getDeclaredList(final String arg0) {
  return null;
}
 
源代码25 项目: olingo-odata2   文件: JPAEmbeddableTypeMock.java
@Override
public <E> ListAttribute<X, E> getDeclaredList(final String arg0, final Class<E> arg1) {
  return null;
}
 
源代码26 项目: olingo-odata2   文件: JPAEmbeddableTypeMock.java
@Override
public ListAttribute<? super X, ?> getList(final String arg0) {
  return null;
}
 
源代码27 项目: olingo-odata2   文件: JPAEmbeddableTypeMock.java
@Override
public <E> ListAttribute<? super X, E> getList(final String arg0, final Class<E> arg1) {
  return null;
}
 
源代码28 项目: olingo-odata2   文件: JPAEmbeddableMock.java
@Override
public ListAttribute<X, ?> getDeclaredList(final String arg0) {
  return null;
}
 
源代码29 项目: olingo-odata2   文件: JPAEmbeddableMock.java
@Override
public <E> ListAttribute<X, E> getDeclaredList(final String arg0, final Class<E> arg1) {
  return null;
}
 
源代码30 项目: olingo-odata2   文件: JPAEmbeddableMock.java
@Override
public ListAttribute<? super X, ?> getList(final String arg0) {
  return null;
}
 
源代码评论
动弹
沙发等你来抢
 类所在包
 类方法
 同包方法