return ret;
}
private EObjectReference createObjectReference(ObjectReference objectReference)
{
EObjectReference ret=null;
if(objectReference instanceof StringReference)
{
ret=new EStringReference();
((EStringReference)ret).setStringValue(((StringReference)objectReference).value());
}
else if(objectReference instanceof ArrayReference)
{
ret=new EArrayReference();
((EArrayReference)ret).setLength(((ArrayReference)objectReference).length());
}
else if(objectReference.referenceType().name().equals("java.lang.Boolean"))
{
ret=new EWrapperReference();
((EWrapperReference)ret).setPrimitiveValue(createPrimitiveValue((PrimitiveValue) objectReference.getValue(objectReference.referenceType().fieldByName("value"))));
}
else if(objectReference.referenceType().name().equals("java.lang.Byte"))
{
ret=new EWrapperReference();
((EWrapperReference)ret).setPrimitiveValue(createPrimitiveValue((PrimitiveValue) objectReference.getValue(objectReference.referenceType().fieldByName("value"))));
}
else if(objectReference.referenceType().name().equals("java.lang.Character"))
{
ret=new EWrapperReference();
((EWrapperReference)ret).setPrimitiveValue(createPrimitiveValue((PrimitiveValue) objectReference.getValue(objectReference.referenceType().fieldByName("value"))));
}
else if(objectReference.referenceType().name().equals("java.lang.Double"))
{
ret=new EWrapperReference();
((EWrapperReference)ret).setPrimitiveValue(createPrimitiveValue((PrimitiveValue) objectReference.getValue(objectReference.referenceType().fieldByName("value"))));
}
else if(objectReference.referenceType().name().equals("java.lang.Float"))
{
ret=new EWrapperReference();
((EWrapperReference)ret).setPrimitiveValue(createPrimitiveValue((PrimitiveValue) objectReference.getValue(objectReference.referenceType().fieldByName("value"))));
}
else if(objectReference.referenceType().name().equals("java.lang.Integer"))
{
ret=new EWrapperReference();
((EWrapperReference)ret).setPrimitiveValue(createPrimitiveValue((PrimitiveValue) objectReference.getValue(objectReference.referenceType().fieldByName("value"))));
}
else if(objectReference.referenceType().name().equals("java.lang.Long"))
{
ret=new EWrapperReference();
((EWrapperReference)ret).setPrimitiveValue(createPrimitiveValue((PrimitiveValue) objectReference.getValue(objectReference.referenceType().fieldByName("value"))));
}
else if(objectReference.referenceType().name().equals("java.lang.Short"))
{
ret=new EWrapperReference();
((EWrapperReference)ret).setPrimitiveValue(createPrimitiveValue((PrimitiveValue) objectReference.getValue(objectReference.referenceType().fieldByName("value"))));
}
else
ret=new EObjectReference();
ret.setReferenceType(createQueryReferenceType(objectReference.referenceType()));
ret.setUniqueId(objectReference.uniqueID());
JPAManager.getJPAManager().getEntityManager().persist(ret);
return ret;
}