private CollectionMemento(final ObjectSpecId owningType, final String id, final OneToManyAssociation collection) { this.owningType = owningType; this.id = id; this.collection = collection; this.collectionId = collection.getId(); this.collectionName = collection.getName(); }
public String getName(final SpecificationLoader specificationLoader) { return getCollection(specificationLoader).getName(); }
public String getName() { return getCollection().getName(); }
@Test public void name() { expectPeerToReturnNamedFacet(); assertThat(association.getName(), is(equalTo("My name"))); }
private AggregateAdapters aggregateAdaptersFor(final ObjectAdapter rootAdapter) { final AggregateAdapters aggregateAdapters = new AggregateAdapters(rootAdapter); final Oid rootOid = rootAdapter.getOid(); for (final OneToManyAssociation otma : rootAdapter.getSpecification().getCollections()) { final AggregatedOid aggregatedOid = new AggregatedOid(rootOid, otma.getName()); final ObjectAdapter collectionAdapter = getAdapterFor(aggregatedOid); if (collectionAdapter != null) { // collection adapters are lazily created and so there may not // be one. aggregateAdapters.addCollectionAdapter(otma, collectionAdapter); } } return aggregateAdapters; }