From: tobias.weih <kn...@us...> - 2005-03-14 17:49:01
|
Update of /cvsroot/xinity/XinityBASE/src.gen/oeg/xinity/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16676/src.gen/oeg/xinity/test Added Files: Test.java Test.hbm.xml TestForm.xml TestFactory.java TestStub.java Log Message: rc1 --- NEW FILE: Test.hbm.xml --- <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 2.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> <hibernate-mapping> <class name="oeg.xinity.test.TestStub" table="TEST_TEST" > <id name="uid" column="UID" type="java.lang.String" length="64" > <generator class="org.xinity.base.XBOIdGenerator"> </generator> </id> <discriminator column="class" type="string" /> <!-- SIMPLE PROPERTIES --> <!-- NAME --> <property name="Name" type="java.lang.String" > <column name="NAME" sql-type="VARCHAR(255)" /> </property> <!-- RELATIONS--> <!-- COMMON XinityBaseObject ATTRIBUTES --> <set name="actionLog" lazy="true" inverse="false" cascade="none" sort="unsorted" > <key column="ACTIONLOG_FK" /> <one-to-many class="org.xinity.base.ActionLog" /> </set> <property name="visible" type="java.lang.Boolean" > <column name="VISIBLE" sql-type="BIT" /> </property> <property name="xinityBASE_listGroupId" type="java.lang.String" > <column name="XINITY_B_A_S_E_LIST_GROUP_ID" sql-type="VARCHAR(255)" /> </property> <property name="xinityBASE_readGroupId" type="java.lang.String" > <column name="XINITY_B_A_S_E_READ_GROUP_ID" sql-type="VARCHAR(255)" /> </property> <property name="xinityBASE_writeGroupId" type="java.lang.String" > <column name="XINITY_B_A_S_E_WRITE_GROUP_ID" sql-type="VARCHAR(255)" /> </property> <property name="xinityBASE_deleteGroupId" type="java.lang.String" > <column name="XINITY_B_A_S_E_DELETE_GROUP_ID" sql-type="VARCHAR(255)" /> </property> <property name="xinityBASE_CreateBy" type="java.lang.String" > <column name="XINITY_B_A_S_E__CREATE_BY" sql-type="VARCHAR(255)" /> </property> <property name="xinityBASE_ModifiedBy" type="java.lang.String" > <column name="XINITY_B_A_S_E__MODIFIED_BY" sql-type="VARCHAR(255)" /> </property> <property name="xinityBASE_CreationDate" type="java.util.Date" > <column name="XINITY_B_A_S_E__CREATION_DATE" sql-type="DATETIME" /> </property> <property name="xinityBASE_ModificationDate" type="java.util.Date" > <column name="XINITY_B_A_S_E__MODIFICATION_DATE" sql-type="DATETIME" /> </property> <subclass name="oeg.xinity.test.Test" dynamic-update="false" dynamic-insert="false" discriminator-value="Test" /> </class> </hibernate-mapping> --- NEW FILE: TestStub.java --- /* * IMPORTANT!: * THIS CLASS IS GENERATED BY <i>Xinity DevTools</i> AND SHOULD NOT BE MODIFIED MANUALLY! */ package oeg.xinity.test; import java.util.Collection; import java.util.HashSet; import java.util.LinkedHashSet; import org.xinity.base.XinityBaseObject; /** * Created on 13.03.05 23:14 by 1110743859218:7 * Last Modified on 13.03.05 23:16 by 1110743859218:7 * @author <a href=''>Gast</a> * @version XinityBaseServer 2.2 */ public abstract class TestStub extends XinityBaseObject { /* SIMPLE PROPERTIES */ /** -- NAME */ private java.lang.String name; /** getter for simple attribute Name */ public java.lang.String getName() { return this.name; } /** setter for simple attribute Name */ public void setName(java.lang.String newValue) { this.name = newValue; } /* RELATIONS */ } --- NEW FILE: TestFactory.java --- /* * THIS CLASS IS GENERATED BY <i>Xinity DevTools</i> BE CAREFUL WITH CHANGES! */ package oeg.xinity.test; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.Iterator; import net.sf.hibernate.HibernateException; import org.apache.log4j.Logger; import org.xinity.base.ChangeListener; import org.xinity.base.Factory; import org.xinity.base.Session; import org.xinity.base.XinityBaseObject; import org.xinity.base.exceptions.ConfigurationException; import org.xinity.base.exceptions.InternalException; import org.xinity.base.exceptions.CallCausedException; /** * Created on 13.03.05 23:14 by 1110743859218:7 * Last Modified on 13.03.05 23:16 by 1110743859218:7 * @author <a href=''>Gast</a> * @version XinityBaseServer 2.2 */ public class TestFactory extends Factory { /** the main Log4J logger */ private static Logger logger = Logger.getLogger(TestFactory.class); public TestFactory(Session session) throws ConfigurationException { super(session); XBO_CLASS = Test.class; FORMNAME_EDIT = "test.edit"; FORMNAME_READ = "test.read"; FORMNAME_DEFAULT = "test.read"; LISTCONTENT_COMMANDS = new String[] { "test.edit.listAll" }; ORDER_BY = "name ASC"; this.addChangeListener(session.treeBuilder); } /** * @see org.xinity.base.Factory#create(java.util.HashMap) * uses default-values stored as XBUAttributes. */ public XinityBaseObject create(HashMap formdata) throws CallCausedException { Test obj = (Test) super.create(formdata); //TODO: obj.setName("Neues XBO"); return obj; } /** * call this method to make this Factory free its ressources. * Please be tidy and overwrite this method, as soon as you have to free Resources! * Make sure to call super.destroy() if you overwrite this method. */ public void destroy() { super.destroy(); //TODO: } } --- NEW FILE: TestForm.xml --- <!-- <input ref="Ref_name" [span="Number_of_spancols"] [readonly="true|false"] [type="integer|date|float" format="formating_string"] [lines="Num_of_lines"] [keyword="keyword_for_context_help"] [style="password" [span="Number_of_spancols"] /> --> <!-- <label [span="Number_of_spancols"] [keyword="keyword_for_context_help"] [halign="left|right|center"] [lines="Num_of_lines"] [separator="true|false"] [font="normal"] [ref="Ref_name"] [span="Number_of_spancols"]> Label_text </label> --> <xml ns="/Adress/"> <title>FORMULARTITEL</title> <!-- simple attributes --> <group cols="2" span="2"><nolabel/> <label>Name</label> <input ref="Name" readonly="false" type="String" </input> </group> <!-- relations --> <group cols="2" span="2"><nolabel/> </group> </xml> --- NEW FILE: Test.java --- /* * THIS CLASS IS GENERATED BY <i>Xinity DevTools</i> BE CAREFUL WITH CHANGES! */ package oeg.xinity.test; import java.util.Collection; import java.util.HashMap; import java.util.Iterator; import org.apache.log4j.Logger; import org.xinity.base.Command; import org.xinity.base.ErrorMessageCommand; import org.xinity.base.FormNotValidCommand; import org.xinity.base.Factory; import org.xinity.base.XinityBaseObject; import org.xinity.base.exceptions.CallCausedException; import org.xinity.base.exceptions.SingeltonNotFoundException; import org.xinity.base.exceptions.ConfigurationException; import org.xinity.base.exceptions.InternalException; /** * Created on 13.03.05 23:14 by 1110743859218:7 * Last Modified on 13.03.05 23:16 by 1110743859218:7 * @author <a href=''>Gast</a> * @version XinityBaseServer 2.2 */ public class Test extends TestStub { /** the main Log4J logger */ private static Logger logger = Logger.getLogger(Test.class); /* FORM_* keys for simple attributes */ public static final String FORM_UID = "__uid__"; /** form.data-Key: null */ public static final String FORM_NAME = "Name"; /* FORM_* keys for Relations */ /** * Fills a formdata-HashMap with the data of this entity. This formdata is * used for showing formdata in the client. * <p> * this implementation uses the super.buildValuesByReflection() to build the * simple properties and builds the values of the related entities * @param command * unused in this implementation */ public HashMap buildValues(Command command) throws CallCausedException { logger.debug("building values..."); HashMap formData = super.buildValuesByReflection(); formData.put(FORM_UID, this.getUid()); logger.debug("...done"); return formData; } /** /** * Fills the entity with the given formdata * <p> * this implementation uses the super.buildValuesByReflection() to build the * simple properties and builds the values of the related entities */ public void loadValues(HashMap formdata) throws CallCausedException { logger.debug("loading values..."); super.loadValuesByReflection(formdata); logger.debug("...done"); } /** * Returns a HashMap with all Form-Lists of the XBO. Form-Lists are used in * the the Command "Client.displayForm" if you want to display Lists i.e. * for ComboBoxes. * <p> * * In this implementation the follwing lists are returned: * <ul> * <li> TODO: * </ul> * * @see StaffMemberFactory.showForm() for list-usage * @return A Map containing all form.lists of this XBO. */ public void getFormLists(HashMap formlists) { if (formlists.containsKey(this.getClass().getName())) return; formlists.put(this.getClass().getName(), null); // formlists.put(FORM_ABC, ABCFactory.LIST_ABS); } return !error; } /** * returns TODO: getLabel() */ public java.lang.String createLabel(String variant) { if (getLabel() != null) return getLabel(); else return super.createLabel(variant); } /** * each entity has an icon that is shown in the CommandTree * or in the title of a form. The icons are represented by * int-Codes specified by the Client.IconCache. * <p> * this implementation returns the DEFAULT_ICON * @param an implementation may use this parameter to chose an icon * @return the DEFAULT_ICON */ public int getIconCode(String variant) { return super.getIconCode(variant); } } |