You have a WsensorstateCustomizer customizer I assume set on the Wsensorstate entity, but the mapping you are adding is set to reference Wsensorstate.class. This is telling EclipseLink that you are trying to build an array/collection of Wsensorstate, which isn't allowed as Wsensorstate is an entity with a RelationalDescriptor. Instead, you will have to create a java class for the CAlarmMess structure so that you get a collection of CAlarmMess objects in your Wsensorstate entity.
Or you can map the alarme directly to a VARRAY and deal with the Oracle object yourself, but I'd go with the previous approach.
You have a WsensorstateCustomizer customizer I assume set on the Wsensorstate entity, but the mapping you are adding is set to reference Wsensorstate.class. This is telling EclipseLink that you are trying to build an array/collection of Wsensorstate, which isn't allowed as Wsensorstate is an entity with a RelationalDescriptor. Instead, you will have to create a java class for the CAlarmMess structure so that you get a collection of CAlarmMess objects in your Wsensorstate entity.
Or you can map the alarme directly to a VARRAY and deal with the Oracle object yourself, but I'd go with the previous approach. You will need to build an ObjectRelationalDataTypeDescriptor for the CAlarmMess java class as I do not know if this is exposed through the JPA interface, much like you are building the ObjectArrayMapping. A simple example from the EclipseLink automated tests is: ObjectRelationalDataTypeDescriptor descriptor = new ObjectRelationalDataTypeDescriptor(); // SECTION: DESCRIPTOR descriptor.
SetJavaClass(Phone. Class); Vector vector = new Vector(); vector. AddElement("PolicyHolders"); descriptor.
SetTableNames(vector); // SECTION: PROPERTIES descriptor. DescriptorIsAggregate(); descriptor. SetStructureName("PHONE_TYPE"); descriptor.
AddFieldOrdering("PHONETYPE"); descriptor. AddFieldOrdering("AREACODE"); descriptor. AddFieldOrdering("PHONENUMBER"); descriptor.
AddDirectMapping("type", "getType", "setType", "PHONETYPE"); descriptor. AddDirectMapping("areaCode", "getAreaCode", "setAreaCode", "AREACODE"); descriptor. AddDirectMapping("number", "getNumber", "setNumber", "PHONENUMBER"); Which will need to be added to the session in a session customizer before it can be used by the ObjectArrayMapping.
Thank you for your reply, Chris. Where should I place this ObjectRelationalDataTypeDescriptor? How to add it to session?
And how to get it in ObjectArrayMapping? Another question: CAlarmMess isn't an entity class, how should I work with it (some annotations etc. )? – kardanov Mar 30 at 15:10 Ok, I created session customizer as you told me and added it to the session.
How to use it in ObjectArrayMapping? – kardanov Mar 30 at 15:24 @Chris I'm not sure if you were notified about my previous comments, but it could be nice of you to answer. You're the only person ready to help me, and I really need this help :) – kardanov Mar 30 at 15:51 Other way around.
You use the session customizer to create an ObjectRelationalDataTypeDescriptor for a java representation of your CAlarmMess struct. You would then add this to the session, so that other descriptors can map to it - so that your arrayMapping you set up in the descriptor customizer can then call – Chris Mar 30 at 19:21 setReferenceClass(CAlarmMess. Class); You will probably need to mark the alarme attribute as transient in annotations so it doesn't get processed.
As the CAlarmMess java class wouldn't be an entity, it shouldn't have JPA annotations on it. – Chris Mar 30 at 19:36.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.