@Override protected Value getValue(Object instance) throws RepositoryException { Value value = super.getValue(instance); if (!merged && value instanceof Resource && !isManaged(instance)) { merged = true; } return value; }
@Override protected Value getValue(Object instance) throws RepositoryException { Value value = super.getValue(instance); if (!merged && value instanceof Resource && !isManaged(instance)) { merged = true; } return value; }
public boolean contains(Object o) { ObjectConnection conn = getObjectConnection(); try { Value val = getValue(o); return conn.hasStatement(getResource(), getURI(), val); } catch (RepositoryException e) { throw new ObjectPersistException(e); } }
public boolean contains(Object o) { ObjectConnection conn = getObjectConnection(); try { Value val = getValue(o); return conn.hasStatement(getResource(), getURI(), val); } catch (RepositoryException e) { throw new ObjectPersistException(e); } }
/** * This method always returns <code>true</code> * * @return <code>true</code> */ public boolean add(Object o) { ObjectConnection conn = getObjectConnection(); try { Value value = getValue(o); add(conn, getResource(), value); if (value instanceof Resource) { refreshEntity(); } } catch (RepositoryException e) { throw new ObjectPersistException(e); } refresh(); refresh(o); return true; }
/** * This method always returns <code>true</code> * * @return <code>true</code> */ public boolean add(Object o) { ObjectConnection conn = getObjectConnection(); try { Value value = getValue(o); add(conn, getResource(), value); if (value instanceof Resource) { refreshEntity(); } } catch (RepositoryException e) { throw new ObjectPersistException(e); } refresh(); refresh(o); return true; }
/** * This method always returns <code>true</code> * * @return <code>true</code> */ public boolean remove(Object o) { ObjectConnection conn = getObjectConnection(); try { Value value = getValue(o); remove(conn, getResource(), value); if (value instanceof Resource) { refreshEntity(); } } catch (RepositoryException e) { throw new ObjectPersistException(e); } refresh(o); refresh(); return true; }
/** * Removes the specified element from this set if it is present. * * @return <code>true</code> if this set contained the specified element. */ public boolean remove(Object o) { boolean contained = contains(o); ObjectConnection conn = getObjectConnection(); try { Value value = getValue(o); remove(conn, getResource(), value); if (value instanceof Resource) { refreshEntity(); } } catch (RepositoryException e) { throw new ObjectPersistException(e); } refresh(o); refresh(); return contained; }