org.hibernate.annotations.Filter Java Examples

The following examples show how to use org.hibernate.annotations.Filter. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AnnotationBinder.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
private static void bindFilters(XAnnotatedElement annotatedElement, EntityBinder entityBinder) {

		Filters filtersAnn = annotatedElement.getAnnotation( Filters.class );
		if ( filtersAnn != null ) {
			for ( Filter filter : filtersAnn.value() ) {
				entityBinder.addFilter(filter);
			}
		}

		Filter filterAnn = annotatedElement.getAnnotation( Filter.class );
		if ( filterAnn != null ) {
			entityBinder.addFilter(filterAnn);
		}
	}
 
Example #2
Source File: CollectionBinder.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
private String getCondition(Filter filter) {
	//set filtering
	String name = filter.name();
	String cond = filter.condition();
	return getCondition( cond, name );
}
 
Example #3
Source File: EntityBinder.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
public void addFilter(Filter filter) {
	filters.add(filter);
}