[Neo4j] overriding protected I underlyingObjectToObject(T object) return null

2011-11-11 Thread jbeau
Hello all,

I stuck with returning null in underlyingObjectToObject.

First of all, I have this class:

public class ClosableIterableAdapterI, T extends IterableWrapperI, T
implements IClosableIterable {

private final ClosableIterableT closableNodeIterable;

public static IF, TY ClosableIterableAdapterIF, TY
from(ClosableIterableTY it) {
return new ClosableIterableAdapterIF, TY(it);
}

public ClosableIterableAdapter(ClosableIterableT closableNodeIterable)
{
super(closableNodeIterable);
this.closableNodeIterable = closableNodeIterable;   
}

@SuppressWarnings(unchecked)
@Override
protected I underlyingObjectToObject(T object) {
// if (true) return (I) object;
// if (false) return null;
}

So long ... it works. But the returned null values destroy my resulting
collection. How can I remove them? I mean how I can avoid to return them?

Thx a lot for every hint.
Jack



--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/overriding-protected-I-underlyingObjectToObject-T-object-return-null-tp3499362p3499362.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] overriding protected I underlyingObjectToObject(T object) return null

2011-11-11 Thread jbeau
Hello Michael,

greetings to the Neustadt :)

I try to realize a multi tenancy environment and started with a first
approach. In a abstract repository I call methods like this:

@Override
 public IClosableIterable findByName(final String name) {
 return
ClosableIterableAdapter.from(getGraphRepository().findAllByPropertyValue(name,
name));
 }

In the ClosableIterableAdapter I posted above I want to avoid putting all
entities into the iterator, which are not valid for the current tenant. The
underlyingObjectToObject() forces to return something. In my case, the non
valid entities are null. I guess it's not a good idea, to filter them later.
I think I have to avoid to put them into the iterator here.

Thx for help
Jack

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/overriding-protected-I-underlyingObjectToObject-T-object-return-null-tp3499362p3499393.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] overriding protected I underlyingObjectToObject(T object) return null

2011-11-11 Thread jbeau
Thx a lot for your advice!

Multitenancy by API would be a great feature. I favor the idea of
partitionated repos found here:
http://blog.vivekprahlad.com/multitenancy-with-neo4jrb

Striesen is ooch schön!

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/overriding-protected-I-underlyingObjectToObject-T-object-return-null-tp3499362p3499420.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] overriding protected I underlyingObjectToObject(T object) return null

2011-11-11 Thread jbeau
I'll talk with James (ractive) about that :)

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/overriding-protected-I-underlyingObjectToObject-T-object-return-null-tp3499362p3499476.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user