Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  * Copyright 2014 Christophe Pollet
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * See the License for the specific language governing permissions and
 * limitations under the License.
package net.cpollet.jixture.fixtures.capacities.filtering;
Proxy class for CleanableFixture. It allows the called to not care about whether the net.cpollet.jixture.fixtures.Fixture actually implements FilterableFixture but still get consistent result.

Christophe Pollet
public class FilterableFixtureProxy implements FilterableFixture {
	private Fixture fixture;

Returns a new instance of FilterableFixtureProxy.

fixture the fixture instance to proxy.
a new instance of FilterableFixture.
	public static FilterableFixtureProxy get(Fixture fixture) {
		return new FilterableFixtureProxy(fixture);
	public FilterableFixtureProxy(Fixture fixture) {
		this. = fixture;

Determines whether the entity must be inserted in database or not.

entity the entity to filter.
true if the entity must be inserted.
	public boolean filter(Object entity) {
		if ( instanceof FilterableFixture) {
			return filterableFixture().filter(entity);
		return true;
New to GrepCode? Check out our FAQ X