private static ObjectSpecification owningSpecFor( final OneToManyAssociation association, final IsisSessionFactory isisSessionFactory) { final SpecificationLoader specificationLoader = isisSessionFactory.getSpecificationLoader(); return specificationLoader.loadSpecification(association.getIdentifier().toClassIdentityString()); }
private static ObjectSpecification owningSpecFor( final OneToManyAssociation association, final IsisSessionFactory isisSessionFactory) { final SpecificationLoader specificationLoader = isisSessionFactory.getSpecificationLoader(); return specificationLoader.loadSpecification(association.getIdentifier().toClassIdentityString()); }
@Override public Object invoke(final Object collectionObject, final Method method, final Object[] args) throws Throwable { // delegate final Object returnValueObj = delegate(method, args); if (interceptedMethods.contains(method)) { resolveIfRequired(domainObject); final InteractionEvent ev = new CollectionMethodEvent(getDelegate(), getCollection().getIdentifier(), getDomainObject(), method.getName(), args, returnValueObj); notifyListeners(ev); return returnValueObj; } if (vetoedMethods.contains(method)) { throw new UnsupportedOperationException(String.format("Method '%s' may not be called directly.", method.getName())); } return returnValueObj; }
public CollectionMemento(final OneToManyAssociation collection) { this(new SpecMemento(owningSpecFor(collection)), collection.getIdentifier().toNameIdentityString()); this.collection = collection; }
private static ObjectSpecification owningSpecFor(final OneToManyAssociation association) { return IsisContext.getSpecificationLoader().loadSpecification(association.getIdentifier().toClassIdentityString()); }
public CollectionMemento(final OneToManyAssociation collection, final IsisSessionFactory isisSessionFactory) { this(owningSpecFor(collection, isisSessionFactory).getSpecId(), collection.getIdentifier().toNameIdentityString(), collection); }
public CollectionMemento(final OneToManyAssociation collection, final IsisSessionFactory isisSessionFactory) { this(owningSpecFor(collection, isisSessionFactory).getSpecId(), collection.getIdentifier().toNameIdentityString(), collection); }
final CollectionAccessEvent ev = new CollectionAccessEvent(getDelegate(), collection.getIdentifier());