您的位置:首页 > 其它

neodatis.odb 第四篇 查询

2008-05-17 03:44 337 查看
Objects objs=odb.getObjects(Entity.class) =>

ObjectReader.getObejcts(){

A=CollectionQueryResultAction
} =>

ObjectReader.getObejctInfos() =>

GenericQueryExecutor.executeFullScan()


A.Start():result=new SimpleList

matchObjectWithOid [ can get nnoi ] =>

AttributeValuesMap map=ObjectReader.readObjectInfoFromOID ->readNativeObjectInfo->
readAtomicNativeObjectInfoAsObject->FileSystemInfterface.readString

map:

A Map where keys are attributes names and values are the values of there attributes

map.setObjectInfoHeader(objectInfoHeader);

ClassAttributeInfo cai = classInfo.getAttributeInfoFromId(attributeId);

AbstractObjectInfo aoi = readNativeObjectInfo(cai.getAttributeType().getId(), attributePosition,

useCache, true, true);
object = aoi.getObject();

map.put(relationNameToSearch, object);


boolean=LikeCriterion.match(map)

<if boolean>
A.objectMatch(oid,nnoi){

B=A.getCurrentInstance =>

NonNativeObjectInfo B=InstanceBuilder.buildOneInstance(nnoi) {

1.Cache.getObjectWithOid

2.ClassInstrospector.newInstanceOf(clazz)

3. < for nnoi.getClassInfo() > 字段赋值过程

AtomicNativeObjectInfo C=nnoi.getAttributeValueFromId(id) 字段属性

value=C.getObject() =>

field.set(B,value);

</for>

</if boolean>
}

result.add(B)

A.end()



getObject()=>
return result
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: