Implementing domain model

Hello everyone,
I am not sure if this is the most suitable forum to ask this question, but here i go:
I am developing an online auction application with hibernate. I am learning hibernate with the book "Hibernate in action" and following the example.
In this example there is a class called Category (has a many to many relation with Item class) and look like this:
public class Category implements Serializable {
     private Long id = null;
     private int version;
     private String name;
     private Category parentCategory;
     private Set childCategories = new HashSet();
     private Date created = new Date();
}Categories and Subcategories are implemented in just one class.
But i was thinking in using two classes instead of one, Category and Subcategory. Something like this:
import java.io.Serializable;
public class Category implements Serializable {
     private int id = 0;
     private String title = null;
     private String description = null;
     private List<SubCategory> subCategories = new ArrayList<SubCategory>();
}and
import java.io.Serializable;
public class SubCategory implements Serializable {
     private int id = 0;
     private String title = null;
     private String description = null;
}Maybe is a silly question, but i am not sure of which is the best approach. Can someone help me?
Thanks in advance.

Categories and Subcategories are implemented in just one class.That seems right to me, especially since they're trying to illustrate parent/child relationships.
But i was thinking in using two classes instead of one, Category and Subcategory. Something like this:I see NO value in this design. None whatsoever. The attributes are duplicated. What has repeating yourself bought you? It's not clearer. There's no special behavior associated with being a Subcategory that's different from a Category. Wrong in every way, IMO.
Use the approach in the book. The point isn't the OO design, it's learning Hibernate. Go with it until you've mastered Hibernate.
%

Similar Messages

  • Error when implementing JPA domain model in separate JAR module

    Hi,
    I'm using JPA/TopLink Essentials to implement my domain model and services. From an architectural viewpoint I want to implement this as seperate Java project, while my View/Controller is implemented in another Java project. This last project has a dependency on the Model project. Deployment on an OC4J 10.1.3 is ok, but when I use a JSP, I get the following error. (Note that directly implementing my JPA classes in the View/Controller project does not give any errors.)
    Thanx, Ronald
    java.lang.NullPointerException     at oracle.toplink.essentials.ejb.cmp3.persistence.ArchiveFactoryImpl.createArchive(ArchiveFactoryImpl.java:64)     at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.findPersistenceArchives(PersistenceUnitProcessor.java:227)     at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.findPersistenceArchives(PersistenceUnitProcessor.java:210)     at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initialize(JavaSECMPInitializer.java:239)     at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initializeFromMain(JavaSECMPInitializer.java:278)     at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.getJavaSECMPInitializer(JavaSECMPInitializer.java:81)     at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createEntityManagerFactory(EntityManagerFactoryProvider.java:119)     at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)     at com.trfsol.model.JPAResourceBean.getEMF(JPAResourceBean.java:23)     at com.trfsol.model.Service.getEmp(Service.java:28)     at com.trfsol.JPAServlet.doGet(JPAServlet.java:24)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:719)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)     at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)     at java.lang.Thread.run(Thread.java:595)

    Servlet class:
         protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              Collection<Emp> emps = new Service().getEmp();
              for (Emp emp : emps) {
                   System.out.println("Emp " + emp.getEname());
    In which the Service class comes from the Model project.
    Service class:
    public EntityManagerFactory getEMF () {
    if (emf == null) {
    emf = Persistence.createEntityManagerFactory("default", new java.util.HashMap());
    return emf;
    public Collection<Emp> getEmp(){
    EntityManagerFactory emf = getE
    EntityManager em = emf.createEntityManager();
    try{
    Collection<Emp> result = em.createNamedQuery("findAllEmps").getResultList();
    return result;
    finally{
    em.close();
    Persistence.xml (in the META-INF dir of the Model project)
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence persistence_1_0.xsd" version="1.0">
    <persistence-unit name="default" transaction-type="RESOURCE_LOCAL">
    <provider>
    oracle.toplink.essentials.PersistenceProvider
    </provider>
    <class>com.trfsol.Dept</class>
    <class>com.trfsol.Emp</class>
    <properties>
    <property name="toplink.logging.level" value="FINE"/>
    <property name="toplink.jdbc.driver" value="oracle.jdbc.OracleDriver"/>
    <property name="toplink.jdbc.url" value="jdbc:oracle:thin:@localhost:1521:ORCL"/>
    <property name="toplink.jdbc.password" value="tiger"/>
    <property name="toplink.jdbc.user" value="scott"/>
    </properties>
    </persistence-unit>
    </persistence>
    Regards, Ronald

  • Rich Domain Model and Local JNDI Lookups

    Hi,
    I'm sure this is a problem a lot of other people have come across but there seems to be very little coherent discussion on the issue, so I'd very much appreciate any views people might have on the matter.
    The problem is whether or not you compromise your object-oriented principles and stick with the field or method level EJB dependency injection annotations, a procedural programming style, and a weak domain-model; or, strive for a richer domain model with a sub-optimal JDNI lookup solution.
    Take adding an item to simple shopping cart as an example.
    @Stateful
    public class CartBean implements Cart {
      @EJB
      private ProductManagerLocal productManager;
      @EJB
      private PricingServiceLocal pricingService;
      private Order order;
      public void addItem(final int productId) {
        if (order.containsLineItem(productId) {
          order.addQuantity(productId, 1);
        } else {
          final Product product = productManager.getProduct(productId);
          final Price price = pricingService.getPrice(productId);
          order.createLineItem(product, price);
    }The code above makes Cart dependent on Product and Price, when in reality Cart only cares about Order. The logic in the addItem() method should really be in the Order object on the basis Order is the information expert, but because Order is a POJO you can't inject the necessary EJB references. What's more, because the EJB interfaces are local they don't have a JNDI name assigned in the same way a remote one would.
    To perform a portable lookup of the required EJBs from within an instance of the Order class, the method must be invoked by a component with the required EJB references in its private namespace. See https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html#POJOLocalEJB. This makes for a very brittle solution with no compile time checks whatsoever.
    The problem seems to have been addressed in EJB 3.1 as the proposal for portable global JNDI names also applies to session beans exposing local only interfaces. See http://blogs.sun.com/kensaks/entry/portable_global_jndi_names.
    There seems to be very little guidance from Sun on this matter; ALL the examples in the JEE 5 Tutorial follow the anaemic domain model approach with business objects presented as little more than dumb placeholders for persistent data.
    What are people's thoughts on this? When it comes to EJB do we simply have to accept that local service lookups from POJOs aren't that robust and go with a procedural programming style, or should we be implementing a local service locator to facilitate domain objects taking on appropriate responsibilities via access to local stateless session beans / services?

    Hi,
    I'm sure this is a problem a lot of other people have come across but there seems to be very little coherent discussion on the issue, so I'd very much appreciate any views people might have on the matter.
    The problem is whether or not you compromise your object-oriented principles and stick with the field or method level EJB dependency injection annotations, a procedural programming style, and a weak domain-model; or, strive for a richer domain model with a sub-optimal JDNI lookup solution.
    Take adding an item to simple shopping cart as an example.
    @Stateful
    public class CartBean implements Cart {
      @EJB
      private ProductManagerLocal productManager;
      @EJB
      private PricingServiceLocal pricingService;
      private Order order;
      public void addItem(final int productId) {
        if (order.containsLineItem(productId) {
          order.addQuantity(productId, 1);
        } else {
          final Product product = productManager.getProduct(productId);
          final Price price = pricingService.getPrice(productId);
          order.createLineItem(product, price);
    }The code above makes Cart dependent on Product and Price, when in reality Cart only cares about Order. The logic in the addItem() method should really be in the Order object on the basis Order is the information expert, but because Order is a POJO you can't inject the necessary EJB references. What's more, because the EJB interfaces are local they don't have a JNDI name assigned in the same way a remote one would.
    To perform a portable lookup of the required EJBs from within an instance of the Order class, the method must be invoked by a component with the required EJB references in its private namespace. See https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html#POJOLocalEJB. This makes for a very brittle solution with no compile time checks whatsoever.
    The problem seems to have been addressed in EJB 3.1 as the proposal for portable global JNDI names also applies to session beans exposing local only interfaces. See http://blogs.sun.com/kensaks/entry/portable_global_jndi_names.
    There seems to be very little guidance from Sun on this matter; ALL the examples in the JEE 5 Tutorial follow the anaemic domain model approach with business objects presented as little more than dumb placeholders for persistent data.
    What are people's thoughts on this? When it comes to EJB do we simply have to accept that local service lookups from POJOs aren't that robust and go with a procedural programming style, or should we be implementing a local service locator to facilitate domain objects taking on appropriate responsibilities via access to local stateless session beans / services?

  • MCTS 70-466 Implementing Data Models and Reports with Microsoft SQL Server 2012

    I am searching for training kit for Exam 70-466 (Implementing Data Models and Reports with Microsoft SQL Server 2012) but I think is not published yet. I was expecting its release in Jan or Feb 2014. Would any one can tell me its release date or any place
    where I can find this book.
    Thanks
     

    Hi Azhar lqbal Gondal,
    According to your description, since the issue regards training and certification,
     I suggest you post the question in the Learning forums at
    http://social.technet.microsoft.com/Forums/en-US/home?category=learning. It is appropriate and more experts will assist you. If you have a specific technical question about Microsoft SQL Server,
     you can visit and post your question on  the SQL Server Forum.
    There is some detail about Exam 70-466 Implementing Data Models and Reports with Microsoft SQL Server 2012, you can review the following articles.
    Exam content can be found here:
    http://www.microsoft.com/learning/en-us/exam-70-466.aspx
    http://borntolearn.mslearn.net/certification/database/w/wiki/525.466-implementing-data-models-and-reports-with-microsoft-sql-server-2012.aspx#fbid=Mn-t6aRhs-H
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • How to implement MVC model?

    Hi, I have a question on how to implement MVC model, that is, how will the GUI be informed that the data from the Model has been changed?
    Suppose that I have two simple classes, Model and GUI. Model creates 10 integers each time, and then GUI draws some bars whose height is the integers. then after each time the integers has been created, how could GUI know?
    Thanks!!!!

    There is an Observer pattern specific to Google?I so implement the Google Observer pattern. ;o)Isn't that the (G)oogling Observer pattern? ;)

  • PetStore doc, domain model, design decisions, etc

    Hello,
    I've downloaded the PetStore from http://java.sun.com/developer/releases/petstore/ . I installed it and it was ok.
    As it is an example project, I would like to get detailed documentation about this. I mean if a project like this starts what kind of decisions we have, what is the domain model look like, why?, etc.. So a complate description of the project.
    I have checked the web with google but I have not find anything related to this. Would you help me, please?

    Any one know where we can get Business Model, Domain Model and Object Model for Pet store app?
    Thanks.

  • Communication between domain models

    Hi All,
    I have an event that is being dispatched from a domain model (DomainModelEvent.RESULT) which needs to be received from another domain model (DomainModel2.play()).  I've read in various forums the use of patterns such as Messenger or Presenter being helpful for PM-to-PM or PM-to-Domain communication, but not Domain-to-Domain.  Since I'm using Cairngorm, should I just have these domains dispatch a CaringormEvent that a command object can handle.  This creates dependencies between the model and the Cairngorm framework, but is that so bad?  Since it's a DOMAIN model, it is dependent to the application (which is in Cairngorm) anyway?  Does anyone have any insights on this?

    Hi there,
    Do you have a motivation for the domain1 not referencing domain2? Maybe the guideline Options in Loose Coupling could be useful. Checkout the Guidelines section.
    Best,
    Alex

  • How to implement custom Model Class in Oracle ADF?

    I am using Oracle ADF for one of my project and i am using Query component of ADF. For given tables the query component creates view objects and maps the relations. ADF uses its own custom model class for this component and it should understand the DB tables. But for my project i have no access to database. All i can do is pass a string or object/query to the existing (custom) Java class/object, and this model class formulates query and queries the database and returns the value to my Java class. I have to display these results using ADF to the front end. Is There a way to achieve this? Can i replace/override the existing Model class of ADF. If so how?
    Thanks in advance for your help.

    Hi, there:
    Best thing to do is to start with the default login.html page, and then modify it. The login screen is fairly complex and it's easy to just miss a JS function you need to call. To get to default page, you would need to do one deploy (to simulator or whatever), and then look for login.html page in the temporary Xcode or Android project generated from the deployment. It should be under the "deploy" directory in your JDev workspace.
    You can also see all the framework JS files and CSS files that way as well.
    We have had customers implementing custom login screen so we know it can work, but they all had to start with the default login screen and then modify it.
    Thanks,
    Joe Huang

  • How to implement mvc model in designing game architecture

    I have a problem in implementing the mvc architecture in my game designing. I want you to suggest me how should I do it ?
    I have created 3 packages viz : model , view , and controller
    I am confused in which package should include canvas ? which should implement Runnable ? and what actually the model package must include ?
    Also i would like to know that whatever dynamic active background is generated in my game play must it be treated as model or not ?

    Hi
    Here is a good article about this: http://www-128.ibm.com/developerworks/library/wi-arch6/?ca=drs-wi3704
    Mihai

  • How do I implement IBIS models in Multisim 10?

    I am trying to do a simulation of a board design I am working on, and have models for every component but one, a Toshiba 62003F 7 Channel Darlington sink driver. I found a comparable part from on semiconductor that has and IBIS model, and want to implement this into my Multisim schematic. How to I add an IBIS file to a custom part I created in Multisim? The IBIS file is provided as an attachment. I tried using IBIS2SPICE by Intusoft but was unsucessful. If anyone could help I would greatly appreciate it.
    PS maybe it would be possible to take V/I relationship and create a model this way?
    Thanks!!!
    Attachments:
    MC1413D.zip ‏2 KB

    The IBIS standard is not included as a supported feature on the Multisim simulation engine. Sometimes those IBIS-to-SPICE converters do work, but in other cases they do not, however entering IBIS code in Multisim is not possible at this point.
    Nestor
    National Instruments

  • How can I implement a model (DialogResult) window function?

    //Popup extends Stage,
    Popup popup=new Popup(primaryStage,title,content);
    DialogResult result=popup.show();
    if(result==DialogResult.ok)//if user doesn't close stage, this line isn't triggered.
       //my next code here...
      public enum DialogResult
             OK,
             Cancel,
             Yes,
             No,
             None
        } Actually,I implemented Popup based on Stage, and I created a lot of customized control in popup,I'd like to wait for the Dialogresult value if user do something on my popup,if user doesn't close stage, if(result==DialogResult.ok) isn't triggered.any suggestion?
    Edited by: imtoocute on Apr 30, 2012 1:41 PM

    This has got to be one of the most asked questions on the forum - I guess because (with the exception of JavaFX 2.0), every UI technology known to man has had this functionality built-in since their first version.
    There are a few different ways to achieve this:
    See:
    Dialog Box Problem "Dialog Box Problem"
    https://gist.github.com/1887631 "     JavaFX Modal Confirm Dialog Box Example"
    http://javafx-jira.kenai.com/browse/RT-19783 "Provide an option to allow modal windows to be blocking" (implemented for 2.2)
    http://javafx-jira.kenai.com/browse/RT-12643 "Add javafx.scene.control.Alert class"
    Quick answer is that unless you are using 2.2 and can use a stage.showAndWait() function, then implement your dialog via a stage or a popup or a stackpane overlay and use callbacks on actions in the dialog to collect the result of user interaction with the dialog and resume execution.
    Hopefully that helps you.

  • Best practise - Domain model design

    Hello forum,
    we're writing an application divided into three sub projects where one of the sub projects will be realized using J2EE and the other two sub projects are stand alone fat client applications realized using Swing. So that's the background...
    And now the questions:
    After doing some research on J2EE best practise topics I found the TransferObject-Pattern (http://java.sun.com/blueprints/corej2eepatterns/Patterns/TransferObject.html) which we certainly want to apply to the J2EE sub project and to one of the standalone client applications also. To avoid code duplications I like the "Entity Inherits Transfer Object Strategy" approach outlined in the document referenced above. But why does the entity bean inherit from the transfer object class and not vice versa? In my opinion the tranfer object adds additional functionality (coarse grained getData()-method) to the class and isn't it a design goal in OO languages that the class that extends a base class has more functionality than the base class?
    For the standalone application we want to use a similar approach and the first idea is to desgin the entitys and let the TO classes extend these entitys.
    When I get it right the basic idea behind all of these design schemes is the "Proxy pattern" but when I design it using the previously mentioned way (Entity <-- EntityTO) I will have a very mighty prox beeing able to execute all operations the base class is able to execute.
    Any tips and comments welcome!
    Thanks in advance!
    Henning

    Hello Kaj,
    at first - thanks for your fast response and sorry for coming back to this topic so late.
    After reading a bit more on patterns in general what about avoiding inheritance
    completely and using the proxy pattern instead (As explained eg.
    http://www.javaworld.com/javaworld/jw-02-2002/jw-0222-designpatterns.html here) - so moving the design to a "has a" relationship rather than an "is a" relationship.
    In the previous post you said that the client shouldn't be aware that there are entity beans and therefore the mentioned implementation was chosen - But if I implement it vice versa (Entity is base class, TO extends entity) and do not expose any of the methods of the entity bean I would achieve the same effect, or not? Clients are only able to work with the TOs.
    I have some headaches implementing it in SUN's recommended way because of the Serialization support necessary within the TOs. Implemented in SUN's way the Entity bean would also have serialization support which isn't necessary because they're persisted using Hibernate.
    Thanks in advance
    Henning

  • Course 10778 Implementing Data Models and Reports with Microsoft SQL Server 2012

    Hi,
    I recently imported the virtual machines for the above-mentioned course. I am running Windows Server 2012 Standard edition on my pc. When I tried the first lab exercise, I could
    not open the report in MS Sharepoint Server. The error was to do with the following: "cannot impersonate user for data source 'AdventureWorksDW' ", and also "cannot convert claims identity to windows token sharepoint". I followed all the
    steps in the setup guide.
    Please assist me with this regard,
    Many thanks.

    Hi Zimiso,
    Based on the error message, it seems that the issue is caused by the incorrect configuration of Claims to Windows Token Service (C2WTS) that it was not running under a domain account.
    The domain account used by the Claims to Windows Token Service needs to be granted the following rights through the Local Security Policy:
    Act as part of the operating system
    Impersonate a client after authentication
    Log on as a service
    We can find these settings under Administrative Tools > Local Security Policy > Local Policies > User Rights Assignment. Please note that we should add the service account to the local Administrators Groups ahead.
    Reference:
    http://msdn.microsoft.com/en-us/library/hh231678.aspx
    http://blogs.msdn.com/b/psssql/archive/2012/08/20/sharepoint-adventures-reporting-services-claims-and-one-way-trusts.aspx
    Hope this helps.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • EJB 3.0-POJO-Domain-Model-BusinessArchive?

    Hello Forum,
    I'am currently developing my first EJB application using EJB 3.0 specification.
    The POJO's I've developed shall be used within the EJB app and within a standalone Swing-Client. The Swin Client shall also utilize the new JPA features.
    The Problem I have is that a colleague told me I shall pack the POJO classes as a business archive in order to not having to develop the POJO classes twice in the two projects.
    Can someone give me an idea of a what a business archive is? Is it just a jar file containing the POJO classes only? On my own I would have just created a new Eclipse Project developed the POJO classes in that project, jared them and used them as library within the other projects.
    But I shall not create a separate project for it - I shall develop the Beans within the EJB project and make a business archive of it...
    Thanks in Advance!
    Henning

    Problem solved.
    We just use the classes within the EJB app as normal and create an additional jar file which is used as library within the other app.
    Henning

  • Attempt to create & implement a domain which may hold ArrayList SelectItem

    IDE used - JDeveloper 11.1.1.3
    Hi,
    I tried to create a new domoan with the following class
    *public class SelectItemList implements DomainInterface, Serializable {*
    private ArrayList<SelectItem> array;
    private ArrayList<SelectItem> lst;
    *public SelectItemList(ArrayList<SelectItem> val) {*
    lst = val;
    validate();
    *protected SelectItemList() {*
    lst = new ArrayList<SelectItem>();
    *public ArrayList<SelectItem> getData() {*
    return lst;
    ** <b>Internal:</b> <em>Applications should not use this method.</em>*
    public void setContext(DomainOwnerInterface owner, Transaction trans,
    *Object obj) {*
    ** Implements domain validation logic and throws a JboException on error.*
    *protected void validate() {*
    *// ### Implement custom domain validation logic here. ###*
    *public String toString() {*
    *if (lst != null) {*
    return lst.toString();
    return null;
    *public boolean equals(Object obj) {*
    *if (obj instanceof DomainInterface) {*
    *if (lst != null) {*
    return lst.equals(((DomainInterface)obj).getData());
    return ((DomainInterface)obj).getData() == null;
    return false;
    *public ArrayList<SelectItem> getArray() {*
    return this.lst;
    Domain XML
    <?xml version="1.0" encoding="windows-1252" ?>
    <!DOCTYPE Domain SYSTEM "jbo_03_01.dtd">
    <!---->
    <Domain
    xmlns="http://xmlns.oracle.com/bc4j"
    Name="SelectItemList"
    Version="11.1.1.56.60">
    <DesignTime>
    <Attr Name="_type" Value="java.util.ArrayList"/>
    <Attr Name="_isPersistent" Value="false"/>
    <Attr Name="_isQueriable" Value="true"/>
    <Attr Name="_isUpdateable" Value="true"/>
    <Attr Name="_columnType" Value="VARCHAR2(500)"/>
    <Attr Name="_isCodegen" Value="true"/>
    <Attr Name="_isSelected" Value="true"/>
    </DesignTime>
    </Domain>
    In the ViewRowImpl Class I am initializing the value of a transient Attribute of type SelectItemList
    I have an EL which binds to a SelectItems which is a child of SelectOneChoice contained in a table column.
    *value="#{row.bindings.SpecialBodyPartList.array}*
    This however does not work. The dropdown does not show any values.
    If I use the same class in my managed bean & bind it to the SelectItems then I see the correct results.
    Am I missing out something?
    Thanks,
    Prakash

    Hi Prakash,
    I have a very similar business requirement. Can you please help me in this.
    This is the structure in which I need the return type for my service interface's custom method.
    <xsd:element name="output">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="UseCaseId" type="xsd:string" minOccurs="1" maxOccurs="1"/>
    <xsd:element name="ActivityType" type="xsd:string" minOccurs="1" maxOccurs="1"/>
    <xsd:element name="ActivitySubType" type="xsd:string" minOccurs="1" maxOccurs="1"/>
    <xsd:element name="SiebelInputParams" minOccurs="1" maxOccurs="1">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Status" type="xsd:string" minOccurs="1" maxOccurs="1"/>
    <xsd:element name="Assignee" type="xsd:string" minOccurs="0" maxOccurs="1"/>
    <xsd:element name="ExpirationTime" type="xsd:string" minOccurs="0" maxOccurs="1"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="WebPageParams">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Assignee" type="xsd:string" minOccurs="0" maxOccurs="1"/>
    <xsd:element name="ExpirationTime" type="xsd:string" minOccurs="0" maxOccurs="1"/>
    <xsd:element name="RequestXSLT" type="xsd:string" minOccurs="0" maxOccurs="1"/>
    <xsd:element name="ResponseXSLT" type="xsd:string" minOccurs="0" maxOccurs="1"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    So, I created ABCViewObject (Rows populated programmatically ,not based on sql query ) and then created viewAttributes accordingly to get the above xsd structure.
    ABCViewObject
    AttibuteName                                 DataType
    UseCaseId String
    ActivityType String
    ActivitySubType String
    SiebelInputParams model.util.SiebelInputParameters
    WebPageParams model.util.WebPageParameters
    I made my method to return List<ABCViewRowImpl> type. That was fine. I could see the method available, in the list of 'Custom methods' while creating service interface.
    But the problem is, after I select the type for the 'util.List' of my return type for my custom method, I could not proceed to 'Next'. The error I get is
    'Java Type model.util.model.util.SiebelInputParameters referenced by SiebelInputParams is currently not supported'
    Kindly help me in this regard.
    Thanks,
    Sabarisri .N
    Edited by: Sabarisri N on Nov 30, 2011 4:13 PM

Maybe you are looking for

  • Import expoort wizard error on sql server 2008r2

    - Executing (Warning) Messages Warning: Preparation SQL Task 1: Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done. (SQL Server Import and Export Wizard) Warning: Preparation SQL Task 1: Mu

  • Message problem 8520

    When I get a text it doesn't make a noise or appear in my messages I have to go to the sms inbox to view it. Also when I reply to texts I can only see all the texts I have sent but not the reply. I have checked the settings and they seem ok. It start

  • I have a sugestion for iphoto, does anyone knows where I should send a message to?

    In iPhoto, it is possible to name the faces of people that appears in each photo. We have a lot of contats in our agenda. So, it would be very useful if we could, touching with 2 fingers in the trackpad, to chose a face to put as a contact photo.

  • ViewCriteria doesn't work with SQL92SQLBuilderImpl

    Hi, I use JDeveloper 11.1.1.1.0 and Informix 11.5 I have custom Sql builder class: public class InformixSQLBuilder extends SQL92SQLBuilderImpl{     @Override     protected boolean getSupportsAliasInUpdateStatements() {         return false;     @Over

  • Restore Lion 10.7.3 from Time Machine Backup Fails

    Follwoing a hard disk failure and installing a new disk, I connected to my Time Capsule to restore my Mackbook Pro running Lion. Choosing the latest backup resulted in it restoring about 36% of the drive and failing with a subsequesnt reboot from whi