Creating DAO layer from java beans(setter and getter methods)

Can anybody explain me how to create an adapter layer (DAO layer) from java beans with no connection and transaction code inside DAO layer?

Sure, have another layer do the transaction work.
Your DAO would make us of this layer.

Similar Messages

  • Creating XML file from Java Bean

    Hi
    Are there any standard methods in Java 1.5 to create XML file from java bean,
    i can use JAXB or castor to do so,
    But i would like to know if there is any thing in java core classes,
    I have seen XMLEncoder, but this is not what i want.
    Any ideas
    Ashish

    Marshall JavaBean to an XML document with JAXB or XMLBeans.

  • Accessing Custom Controller from setter and Getter methods

    Hi Gurus
    How can we access the custom controller from setter and getter methods,is there any way to do that.
    Thanks & Regards
    Rajasekhar

    Hi Steve.
    Thanks very much for valuable information,  the main controller class is getting tracked in mo_owner which is declared as  CL_BSP_WD_VIEW_CONTROLLER, and I'm getting the reference through
    mo_owner ?= owner. (since mo_owner = owner is not getting converted of type mo_owner ). After doing this on whatever the contexnode class (say zl_xxxx_xxx_cnxx) the corressponding context node values are getting turned as  <#ERROR IN METADATA.
    I mean when I'm checking the configuration in bsp_wd_cmpwb configuration tab -> Available Fields->Enlarge the contex node->BTSTATUS (say for Example) there the values are showing as <#ERROR IN METADATA , After executing the above procedure
    I cross checked several times before and after redefining the context node method IF_BSP_MODEL~INIT, before redefining this method UI is working fine, after redefintion UI is throwing below error .
    Exception Details
    CX_SY_REF_IS_INITIAL - Dereferencing of the NULL reference
    Method: CL_BSP_MODEL=>IF_BSP_MODEL_BINDING~IS_ATTRIBUTE_VALID
    Source Text Row: 13
    Thanks & Regards
    Rajasekhar

  • Abstract class with set and get methods

    hi
    how to write set and get methods(plain methods) in an abstartc class
    ex: setUsername(String)
    String getUsername()
    and one class is extending this abstract class and same methods existing in that sub class also..... how to write......plz provide some ideas
    am new to programming....
    asap
    thnx in advance

    yes... as i told u.... i am new to coding......
    and my problem is ..... i have 2 classes one is abstract class without abstract methods.. and another class is extending abstract class.....
    in abstract class i have 2 methods...one is setusername(string) and getusername() ..... how to write these two methods.... in abstract class i have private variables username...... when user logins ..... i need to catch the user name and i need to validate with my oracle database and i need to identify the role of that user and based on role of that user i need to direct him to appropriate jsp page.......
    for that now i am writing business process classes..... the above mentioned two classes are from business process.....
    could u help me now
    thnx in advance

  • Regarding setter and getter methods

    Hi,
    Can anybody tell me the use of setter and getter methods in webdynpro .
    It is generated when we set the calculate property of value attribute to true .
    Thanks a lot .

    Hi Jain
    <b>setter</b> and <b>getter </b>functions will be created when you set the calculated propertyto true
    Consider the following scenario where in you can get some basic idea
    1) First insert a Child "Image" UI Element
    2) Create a Context in a view in which you are using Image UI Element
    3) Value Node
    Name : Image
    Cardidality : 1..1
    4) create 2 Value Attributes
    4)a ImageAlt (Calculate property - true) //this will create getter and setter methods
    4)b ImageSrc (Calculate property - true) //this will create getter and setter methods
    5)Bind the properties of Image
    alt - Image.ImageAlt
    source - Image.ImageSrc
    6) in getImageSrc()
    retrun "XX.gif"
    7) in getImageAlt()
    return "Image Not Available"
    you can even achieve getter and setter methods by doing the following procedure
    goto <b>implementation</b> tab-> rightclick -> <b>source</b> -> <b>generate Getter and Setter methods...</b>
    Best Regards
    Chaitanya.A

  • Doubts in CMP Setter and Getter Methods

    Hi. Just like to clarify something on CMP.
    May I know if there are 6 fields in my database table and I declared only getter and setter methods for 5 of the fields only, will this post any problem in WL8.1?
    Also, suppose I have 6 fields in my database table and I declared 6 setter and getter methods. Throughout my program I only trigger 2 setter methods, will the other 4 setter methods that I didnt trigger set a null or 0 to the fields (since I didn't set any value to them)?
    Thanks and appreciate.

    Unset fields will usually be set to their default value, i.e. null for Objects. You don't have to define / execute setters for columns in the database unless they are non-nullable.
    -- markus.

  • How to Create adf table from java bean

    Hi,
    How to Create adf table from java class (Not from ADF BC).
    Thanks
    Satya

    @vlsn -- you have to follow what shay said.
    Do the following in Model layer ::
    create a table property java class with your columns setters and getters like :
    *public class gridProps {*
    private int sno;
    private String orderNum;
    *public void setSno(int sno) {*
    this.sno = sno;
    *public int getSno() {*
    return sno;
    *public void setOrderNum(String orderNum) {*
    this.orderNum = orderNum;
    *public String getOrderNum() {*
    return orderNum;
    Create another table java class which will populate the values to your column values and return the collection :
    *public class gridPopulate {*
    private  List<gridProps> gridValues ;
    *public List<gridProps> setToGrid(ArrayList<ArrayList> valuesToSet) {*
    *if (valuesToSet == null) {*
    return gridValues;
    gridValues = new ArrayList<gridProps>();
    if(btnValue.equals("completeBtn"))
    return gridValues;
    for(ArrayList<String> tempArr:valuesToSet)
    gridProps gp = new gridProps();
    gp.setSno(Integer.valueOf(tempArr.get(0)));
    gp.setOrderNum(tempArr.get(1));
    return gridValues;
    Right click gridPopulate class and create this as data control.This class will be seen in Data control list.Under this data control,Drag the grid property collection(created earlier) to your page.Then execute your binding(gridPopulate) according to your logic.
    Thanks.(My jdev version 11.1.1.5.0)

  • Auto Javadoc for Setter and getter methods

    Hi
    Is there a way to include javadoc while creating a Setter and getter itself?
    Thanks
    Tanjith

    but why addign javadoc to a getter/setter anywhy?Oracle [url http://download.oracle.com/docs/cd/E16162_01/apirefs.1112/e17483/oracle/jbo/common/AccTravDefImpl.html#getAccTravQualifiers()]does, so it must be OK :)
    But as Timo says, there's no automatic way that I know of. I suppose you could do something like that by making your own code template.
    John

  • Customizing order for setter and getter methods in ViewRowImpl

    I have problem to calculate value for one attribute of my viewObjectRow which depends on values of other attributes in my row and result of stored function. I menaged to do all of this except getting value one of attributes that i need. Order of calling getter methods doesn't fit me. I tried lot of things, but nothig worked! Is there some way to customize calling order for getter and setter methods in ViewRowImpl and How?
    Thanks!

    but why addign javadoc to a getter/setter anywhy?Oracle [url http://download.oracle.com/docs/cd/E16162_01/apirefs.1112/e17483/oracle/jbo/common/AccTravDefImpl.html#getAccTravQualifiers()]does, so it must be OK :)
    But as Timo says, there's no automatic way that I know of. I suppose you could do something like that by making your own code template.
    John

  • Set and get values with vector

    I have a class that that querys a db and sets a value of the result to a vector array. Is it possible to set and retrieve that vector array using the set and get methods?
    ex:
    my class:
    sql = "Select ...";
    Vector fName = new Vector();
    rs = sqlStatement.executeQuery(sql);
    if (rs != null) {
    while (rs.next()) {
    fName.add(rs.getString("fName") + "");
    rs.close();
    setFName(fName);
    how would I set up the set and get methods???
    thanks

    I am unsure of what you are asking:
    A Vector has set and get methods for it, you use indexes of the array to say what element you want to work with.
    If you are asking how do you know what elements of the Vector contain which data columns, you have to remember how you put them in.
    If you are asking if you can use set to load the Vector: then NO, you have to have elemenets already there to change, use the add method.
    If you are asking how to access the elements of the Vector you use an Enumeration:
    for(java.util.Enumeration e = v.elements(); e.hasMoreElements();){
    s = (java.lang.String) e.nextElement();
    vl.add(s.substring(0, 12));
    If you are asking something else: please elaborate what you want--my brain may not be very functional this morning.

  • Accessing the Binding Layer from Java

    Dear All
    How can i Accessing the Binding Layer from Java code i need details document for it becuase i have complex binding object (object inside object)
    Regards
    Mohd.Weshah

    i know but my case is complicated :
    Dear All
    i have generate a human task based task flow and i create a page with payload object . i have an empiterator whcih include the following attributes :
    - id
    - name
    - telephone
    - department (Complex object) it include another attributes - dept and dept Name
    my question i want to fill the empiterator by java code and fill all attributes including complex object (department ) from java code (my backing bean). \
    you can download a document that describe my problems by images and details :
    [http://www.4shared.com/account/document/fTREP1mv/ADF_Question__2_.html]
    Regards
    Wish79

  • Problem while calling servlet from java bean

    I am trying to call a servlet from java bean in cep.
    My java bean:
    package com.bea.wlevs.example.algotrading;
    import com.bea.wlevs.ede.api.StreamSink;
    import com.bea.wlevs.example.algotrading.event.MarketEvent;
    import javax.xml.bind.JAXBContext;
    import javax.xml.bind.Unmarshaller;
    import java.io.BufferedReader;
    import java.io.BufferedWriter;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.OutputStreamWriter;
    import java.io.StringReader;
    import java.net.MalformedURLException;
    import java.net.URL;
    import java.net.URLConnection;
    public class MarketEventBean implements StreamSink {
         String s=null;
         public void onInsertEvent(Object event) {
              if (event instanceof MarketEvent) {
                   MarketEvent marketEvent = (MarketEvent) event;
                   try {
                        JAXBContext cxt = JAXBContext.newInstance(MarketEvent.class);
                        Unmarshaller unmarsh = cxt.createUnmarshaller();
                        StringReader strReader = new StringReader(marketEvent.getString_1());
                        MarketEvent obj = (MarketEvent) unmarsh.unmarshal(strReader);
                        s=obj.getSymbol();
                        System.out.println("data: " + s);
                   } catch(Exception e) {
                        e.printStackTrace();
                   try {
                        System.out.println("test1");
         URL url = new URL("http://172.18.21.94:7001/AppServletrecv-Model-context-root/ReceiveServlet");
         URLConnection conn = url.openConnection();
              System.out.println("test2");
         conn.setDoOutput(true);
              System.out.println("test3");
         BufferedWriter out =
         new BufferedWriter( new OutputStreamWriter( conn.getOutputStream() ) );
         out.write("symbol="+s);
              System.out.println("test4");
         out.flush();
         System.out.println("test5");
         out.close();
         System.out.println("test6");
         BufferedReader in =
         new BufferedReader( new InputStreamReader( conn.getInputStream() ) );
              System.out.println("test7");
         String response;
         while ( (response = in.readLine()) != null ) {
         System.out.println( response );
         in.close();
         catch ( MalformedURLException ex ) {
         // a real program would need to handle this exception
         catch ( IOException ex ) {
         // a real program would need to handle this exception
    My servlet code:
    package model;
    import javax.servlet.http.HttpServlet;
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    public class ReceiveServlet extends HttpServlet {
    private final static String _SYMBOL = "symbol";
    public void doPost(HttpServletRequest request, HttpServletResponse response) {
    * Get the value of form parameter
    // private final static String USERNAME = "username";
    String symbol = request.getParameter( _SYMBOL );
    * Set the content type(MIME Type) of the response.
    response.setContentType("text/html");
    * Write the HTML to the response
    try {
    PrintWriter out = response.getWriter();
    out.println("<html>");
    out.println("<head>");
    out.println("<title> A very simple servlet example</title>");
    out.println("</head>");
    out.println("<body>");
    out.println("<h1>Hello " + symbol +"</h1>");
    out.println("</body>");
    out.println("</html>");
    out.close();
    } catch (IOException e) {
    Web.xml:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    version="2.5" xmlns="http://java.sun.com/xml/ns/javaee">
    <servlet>
    <servlet-name>ReceiveServlet</servlet-name>
    <servlet-class>model.ReceiveServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>ReceiveServlet</servlet-name>
    <url-pattern>/ReceiveServlet</url-pattern>
    </servlet-mapping>
    </web-app>
    My servlet is running in weblogic server.
    But when I am running this program in weblogic server side there is no log.
    Edited by: 856272 on Jun 23, 2011 6:43 AM

    I would run both sides in a debugger and see what code is getting invoked

  • Create web service from java code in Jdeveloper 11.1.1.5

    I am try to create web service from java code by default it is connected to Integrated web logic server and generate a
    WSDL like this.
    http://localhost:7101/javaexcel-project1-context-root/MyWebService1Soap12HttpPort.
    please tell me how we can change this local host to our needed Host and how to deploy this web service to web logic server.

    Hi,
    Just right click on your project and deploy it to your application server (Weblogic Server (Not the Integrated server)). {Before that, you have create your Application server connection in the Jdeveloper).
    After deployment open the Admin console of the weblogic server and find your ear of the project.Click on that (Go to the "Testing tab") and you will get the "WSDL" (Concreate wsdl)  and "Test Client" of the Project.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • When i create new layer from background the new layer then covers up the background.  It previously did not do this.

    I am a rookie.   This worked on previous pics but I apparently have clicked something I shouldn't have.  Thanks for any help.

    The problem with Actions is that as a new user, you are not going to know what steps are happening when the Action runs.  The action could be deleting the background layer, for instance.  Is the action one that came with Photoshop?  If you sourced it from somewhere else, can you give us a link? 
    There is also some ambiguity in the language you use.  Not your fault. But when you say 'create new layer from background' to me that probably means you are copying the background layer.  If that is not the case, could you give a more detailed description of the steps you are taking?
    Do you know how to upload a screen shot?  If you are using Windows 7 or 8, you can use the Snipping tool to drag across your image and layer panel. Save the image, and upload to this thread using the little camera icon.

  • Created a pdf from a word-file and inserted formfields. The fields works in other pdf-readers(nitro,reader etc), but not in adobe reader and acrobat. Please help.

    Hi,
    I have created a pdf from a word-file and inserted formfields for a work related file. I've used nitro pro to create the formfield. They works in nitro, reader, foxit etc. but not adobe reader. From page 3 and out, the font wont show when writing in a formfield. Some formfield doesnt even show.
    Please help me fix this (hopefully before the presentation at work friday) :-)
    File in question: Dropbox - Byggeplassperm_bico_prosjektledelse_2.pdf
    Kind regards
    Tobias

    Agreed. Adobe makes no claims that their Reader will work properly with forms made from third party software.

Maybe you are looking for