Hi,
Here is the container-managed-persistence fields declaration of the bean:
public long id;
public long employeeId;
public long innerresourceId;
public Timestamp reservationTime;
public Timestamp startTime;
public Timestamp finishTime;
public long reservationUsed;
public String description;
The script to create the table:
create table RESERVATION (
ID NUMBER(8) not null,
EMPID NUMBER(8) not null,
RESCID NUMBER(8) not null,
RESTIME DATE not null,
STARTTIME DATE not null,
FINISHTIME DATE not null,
RESUSED NUMBER(1) not null,
RESDESCRIPTION VARCHAR2(400),
constraint PK_RESERVATION primary key (ID),
constraint FK_RESERVAT_REF1037_EMPLOYEE foreign key (EMPID)
references EMPLOYEE (ID),
constraint FK_RESERVAT_REF1038_INNERRES foreign key (RESCID)
references INNERRESOURCE (ID)
)
Deployment descriptor lines described my bean:
<entity>
<description>Reservation</description>
<ejb-name>Reservation</ejb-name>
<home>com.debis.intradeb2.webresources.ejb.reservation.ReservationHome</home
>
<remote>com.debis.intradeb2.webresources.ejb.reservation.Reservation</remote
>
<ejb-class>com.debis.intradeb2.webresources.ejb.reservation.ReservationBean<
/ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>com.debis.intradeb2.webresources.ejb.reservation.Reservation
BeanPK</prim-key-class>
<reentrant>False</reentrant>
<cmp-field>
<field-name>id</field-name>
</cmp-field>
<cmp-field>
<field-name>employeeId</field-name>
</cmp-field>
<cmp-field>
<field-name>innerresourceId</field-name>
</cmp-field>
<cmp-field>
<field-name>reservationTime</field-name>
</cmp-field>
<cmp-field>
<field-name>startTime</field-name>
</cmp-field>
<cmp-field>
<field-name>finishTime</field-name>
</cmp-field>
<cmp-field>
<field-name>reservationUsed</field-name>
</cmp-field>
<cmp-field>
<field-name>description</field-name>
</cmp-field>
</entity>
Jonas-ejb lines described my bean:
<jonas-entity>
<ejb-name>Reservation</ejb-name>
<jndi-name>ReservationHome</jndi-name>
<is-modified-method-name>isModified</is-modified-method-name>
<jdbc-mapping>
<jndi-name>intra</jndi-name>
<jdbc-table-name>Reservation</jdbc-table-name>
<cmp-field-jdbc-mapping>
<field-name>id</field-name>
<jdbc-field-name>id</jdbc-field-name>
</cmp-field-jdbc-mapping>
<cmp-field-jdbc-mapping>
<field-name>employeeId</field-name>
<jdbc-field-name>empid</jdbc-field-name>
</cmp-field-jdbc-mapping>
<cmp-field-jdbc-mapping>
<field-name>innerresourceId</field-name>
<jdbc-field-name>rescid</jdbc-field-name>
</cmp-field-jdbc-mapping>
<cmp-field-jdbc-mapping>
<field-name>reservationTime</field-name>
<jdbc-field-name>restime</jdbc-field-name>
</cmp-field-jdbc-mapping>
<cmp-field-jdbc-mapping>
<field-name>startTime</field-name>
<jdbc-field-name>starttime</jdbc-field-name>
</cmp-field-jdbc-mapping>
<cmp-field-jdbc-mapping>
<field-name>finishTime</field-name>
<jdbc-field-name>finishtime</jdbc-field-name>
</cmp-field-jdbc-mapping>
<cmp-field-jdbc-mapping>
<field-name>reservationUsed</field-name>
<jdbc-field-name>resused</jdbc-field-name>
</cmp-field-jdbc-mapping>
<cmp-field-jdbc-mapping>
<field-name>description</field-name>
<jdbc-field-name>resdescription</jdbc-field-name>
</cmp-field-jdbc-mapping>
<finder-method-jdbc-mapping>
<jonas-method>
<method-name>findById</method-name>
</jonas-method>
<jdbc-where-clause>where id = ?</jdbc-where-clause>
</finder-method-jdbc-mapping>
<finder-method-jdbc-mapping>
<jonas-method>
<method-name>findByEmployeeId</method-name>
</jonas-method>
<jdbc-where-clause>where empid = ? order by
starttime</jdbc-where-clause>
</finder-method-jdbc-mapping>
<finder-method-jdbc-mapping>
<jonas-method>
<method-name>findByEmployeeIdStartTime</method-name>
</jonas-method>
<jdbc-where-clause>where empid = ? and starttime >= ? order by
starttime</jdbc-where-clause>
</finder-method-jdbc-mapping>
<finder-method-jdbc-mapping>
<jonas-method>
<method-name>findByInnerresourceId</method-name>
</jonas-method>
<jdbc-where-clause>where rescid = ? order by
starttime</jdbc-where-clause>
</finder-method-jdbc-mapping>
<finder-method-jdbc-mapping>
<jonas-method>
<method-name>findByFilter</method-name>
</jonas-method>
<jdbc-where-clause>where (rescid = ?1 or ?1 is null) and (empid =
?2 or ?2 is null) and (starttime >= ?3 or ?3 is null) and (starttime <=
?4 or ?4 is null) order by starttime</jdbc-where-clause>
</finder-method-jdbc-mapping>
<finder-method-jdbc-mapping>
<jonas-method>
<method-name>findAll</method-name>
</jonas-method>
<jdbc-where-clause>order by starttime</jdbc-where-clause>
</finder-method-jdbc-mapping>
</jdbc-mapping>
</jonas-entity>
I'm waiting your reply....
Thank you.
Sincerely,
Dmitry Guralnik
EMail: [EMAIL PROTECTED]
----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".