001: /**
002: *
003: * Licensed to the Apache Software Foundation (ASF) under one or more
004: * contributor license agreements. See the NOTICE file distributed with
005: * this work for additional information regarding copyright ownership.
006: * The ASF licenses this file to You under the Apache License, Version 2.0
007: * (the "License"); you may not use this file except in compliance with
008: * the License. You may obtain a copy of the License at
009: *
010: * http://www.apache.org/licenses/LICENSE-2.0
011: *
012: * Unless required by applicable law or agreed to in writing, software
013: * distributed under the License is distributed on an "AS IS" BASIS,
014: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015: * See the License for the specific language governing permissions and
016: * limitations under the License.
017: */package org.apache.openejb.test.entity.ejbql;
018:
019: import javax.ejb.EntityBean;
020: import javax.ejb.EntityContext;
021:
022: public abstract class QueryDataBean implements EntityBean {
023: public abstract Integer getId();
024:
025: public abstract void setId(Integer id);
026:
027: public abstract boolean getBooleanField();
028:
029: public abstract void setBooleanField(boolean value);
030:
031: public abstract char getCharField();
032:
033: public abstract void setCharField(char value);
034:
035: public abstract byte getByteField();
036:
037: public abstract void setByteField(byte value);
038:
039: public abstract short getShortField();
040:
041: public abstract void setShortField(short value);
042:
043: public abstract int getIntField();
044:
045: public abstract void setIntField(int value);
046:
047: public abstract long getLongField();
048:
049: public abstract void setLongField(long value);
050:
051: public abstract float getFloatField();
052:
053: public abstract void setFloatField(float value);
054:
055: public abstract double getDoubleField();
056:
057: public abstract void setDoubleField(double value);
058:
059: public abstract String getStringField();
060:
061: public abstract void setStringField(String value);
062:
063: public Integer ejbCreate(int value) {
064: setId(value);
065: setBooleanField(value == 2);
066: setCharField((char) ('0' + value));
067: setByteField((byte) value);
068: setShortField((short) value);
069: setIntField(value);
070: setLongField(value);
071: setFloatField(value);
072: setDoubleField(value);
073: setStringField("" + value);
074: return null;
075: }
076:
077: public void ejbPostCreate(int field) {
078: }
079:
080: public void setEntityContext(EntityContext ctx) {
081: }
082:
083: public void unsetEntityContext() {
084: }
085:
086: public void ejbActivate() {
087: }
088:
089: public void ejbPassivate() {
090: }
091:
092: public void ejbLoad() {
093: }
094:
095: public void ejbStore() {
096: }
097:
098: public void ejbRemove() {
099: }
100: }
|