Files
Brainstorm/Foundation Test/src/com/foundation/aggregatecollection/test/Foo.java
2014-05-30 10:31:51 -07:00

39 lines
963 B
Java

package com.foundation.aggregatecollection.test;
import com.foundation.metadata.Attribute;
import com.foundation.util.IManagedList;
import com.foundation.util.ManagedList;
/**
* Copyright Declarative Engineering LLC 2006<p>
*/
public class Foo extends AbstractModel {
public static final Attribute BARS = registerCollection(Foo.class, "bars", AO_REFERENCED | AO_LAZY);
/**
* Foo constructor.
*/
public Foo() {
}//Foo()//
/* (non-Javadoc)
* @see com.foundation.common.Entity#lazyLoadAttribute(com.foundation.metadata.Attribute)
*/
protected Object lazyLoadAttribute(Attribute attribute) {
Object result = null;
if(attribute == BARS) {
result = new ManagedList(10, 20);
}//if//
else {
result = super.lazyLoadAttribute(attribute);
}//else//
return result;
}//lazyLoadAttribute()//
/**
* Gets the bars value.
* @return The bars value.
*/
public IManagedList getBars() {
return (IManagedList) getAttributeValue(BARS);
}//getBars()//
}//Foo//