Getting a parameter used to create another parameter

Hi,
I have the following interfaces:
public interface DAO<E extends Entity>
public interface ProductDAO extends DAO<Product>
public interface ClientDAO extends DAO<Client>I would like to do something like below. See the comments in testCreate().
public abstract class AbstractDAOTest<D extends DAO> extends TestCase
    public void testCreate()
        // I would like to do some think like this
        // where E represents the Entity parameter (Product, Client etc.)
        // used in the actual DAO parameter of AbstractDAOTest sublclasses:
        //   ProductDAOTest<ProductDAO> extends AbstractDAOTest
        //   ClientDAOTest<ClientDAO> extends AbstractDAOTest
        E entity = ...
}Any idea?
Thanks.
Oscar

Thanks for your answer.
I was indeed, thinking about something like that.
I was just wondering if there was something less verbose, as when we declare:
class ProductDAOTest<ProductDAO>it is already known that ProductDAO is a DAO parameterized with a Product Entity.
I guess that in that case the parameter Product is kind of private to the ProductDAO declaration and that there is no way to access to it unless doing what you wrote.

Similar Messages

  • How to get LabVIEW to use library created in Xcode using a library node?

    I have written C++ code in the Xcode IDE on Mac OS X. This code controls a camera driver to tell it to take a picture and save it. I want to call this code in LabVIEW. I am trying to use a library node, but when I tell it the location of the Xcode project it doesn't recognize that anything is there. How can I get LabVIEW to recognize this? (Xcode used to be called Project Builder in earlier versions). In the documentation it says to link against libvlexports.a. I have included this file in my Xcode project, but does "link against" mean something more than that?

    To create a framework in XCode that you can reference in LabVIEW for Mac OS:
    Open XCode.
    Select File»New Project.
    Select Framework»Carbon Framework as the project type.
    Name the framework when prompted. Click Finish.
    The XCode browser will now appear. Click on main.c to open the file. This is where you will create your functions. For an example open the file main.c in the Call Library Function Node on Mac with XCode zip file.
    After adding your functions, compile the framework. The compiler settings should all be left at default.
    Access your functions via a Call Library Function Node in LabVIEW.
    To access the functions in a framework using the Call Library Function Node in LabVIEW:
    Place a Call Library Function Node on the block diagram by going to All Functions»Advanced»Call Library Function Node.
    Apple-Click on the Call Library Function Node and select "Configue..."
    Click on the Browse button and browse to your .framework file and click Select to select the framework.
    Type the name of the function you want to access in the Function Name field.
    NOTE: Unlike LabVIEW 7.x for Windows, once your framework is selected, the Function Name field DOES NOT autopopulate a list of functions in the framework.  You must type in the name of the function you want to access.
    Specify the return type of the function.
    Add the number of parameters in the function and specify their types.
    The function prototype will appear in the Function Prototype field according to how you have specified the function parameters.
    Click the OK button.
    Your Call Library Function Node will appear with the number of inputs you selected as well as the output. If LabVIEW cannot find the function you specified within the framework, it will show a broken Run arrow.
    The "Call Library Function Node on Mac with XCode.zip" file (attached) contains a simple framework created in XCode along with its source code in main.c.  main.c simply contains two functions both of which multiply two numbers. One function accepts integers and the other doubles. The zip file also contains a VI that references this framework using a Call Library Function Node.  This VI was created in LabVIEW 7.1 for Mac OS.
    Kind Regards,
    Message Edited by AESulzer on 07-08-2005 06:11 PM
    E. Sulzer
    Applications Engineer
    National Instruments
    Attachments:
    Call Library Function Node on Mac with XCode.zip ‏33 KB

  • Getting error in using the create Reservation API in OM

    Hi All,
    we want to reserve the item while creating the orders from interface tables.
    We are using the INV_RESERVATION_PUB.Create_Reservation for creating the reservation based upon the Lot numbers.
    We have first written the declare block(Anonymous) and reserved the quantity that was working fine using the batch is, orig reference (source order number) etc.
    But when we are using the same code to create a procedure it is giving us the following two errors.
    INV_RSV_SR_DETAIL
    Invalid Serial Number.
    We have checked that these errors are in the validate_serials proc in inv_reservation_validate_pvt Package.
    Can any of you please help us here so that we can overcome this issue.
    Thanks
    -Shivdeep Singh
    We got the error ... we are using a tbl type var for serial nos and initializing it from 0. Now are initializing it with 1. Everything is working fine now.
    Thanks
    -Shivdeep Singh
    Edited by: user1054040 on Apr 25, 2012 11:10 PM

    Hello Aditya,
    Thanks for showing interest in my question.
    To answer your question of what I am trying to do, I hope this can shed some light.
    I was given a PO number and an Outbound delivery number to work with.
    We have created a custom (module) program that handles transactions regarding outbound deliveries, and one feature of this program is to do a reversal of Outbound deliveries already posted.
    When using this reversal feature using the given PO as reference, the error message which I mentioned in my previous post, is displayed on screen.
    The user is curious why this happens and yet the posted outbound delivery involved is reversed.
    Additional info:
    • VL02n > Post Goods Issues - to process(?) given Outbound delivery
    • Custom program - to do the reversal process
    • VL02n does Mvt 641 while the reversal does Mvt 642.
    I apologize as to not being so clear but I am not so well versed with MM and its workings.
    Thanks.
    ~ ric

  • Tables used when creating a sales return with and without refrence

    Hiya gurus,
                    I am developing a report to display sales order and sales return created from one partiular storage location and for one particular division. I need to get the tables used when creating the sales order and the sales return's.
                   For sale order I would be using VBAK and VBAP but for sale return with refrence and without refrence i am not sure which tables to look for.
                 kindly please let me know which tables i go for to get the sale return data.
                Thanking you very much, your efforts are deply appreciated
    Cheers,
    ZIa

    Hi,
    U can see VBFA tablefor CompleteDocu flow with differentconditions.
    Regards,

  • Download parameter using HR create Standlone query Intergrator.

    I have created a view and i need to restrict the download based on some parameters.
    Now when i use HR create Standlone query Intergrator i know i can add a max of 5 paramaters.
    below are few questions:
    i need all 5 paramters but how do i define them using this integrator.I added 1 parameter and it works absolutely fine and restricts the dwnld based on this paramater.For eg i used parameter DOJ equals ---Input the doj and the view downloaded the data whose DOJ is exactly the same as what was inputted.
    Syntax used in where clause : wherre DOJ=$PARAM$.DOJ .
    Now i need to add second paarmeter in the same ADI how do I do that will i have to define the where clause again or just in the same intergrator i can give second parameter name. I tried this as well and when trying to upload i got the error as below :
    PER PER_289713_ADI_INVALID_PARAM : SQL does not contain all bind variables. Please check your input values and try again.
    Second qns , i used again the same HR create Standlone query Intergrator and enter valu e in where clause now i need location as well to restrict the dwnld including the DOJ. syntax : where location =$PARAM$.LOCATION and given the prompt name and type in second parameter as first parameter is alareday occupied by DOJ. the row got uploaded succesfully.now wen i try to run my report i get both the dwnld parmater DOJ ,Location.Input the value in DOJ and then in location it gives me following error whn i try to input location for eg :Hyderabad (NOTE :type i had defined is VARCHAR2 and then why below is coming)
    Error: Form validation Failures Value Hyderabad "Location" is not number.
    After this leaving Blank as location field i try to create documnet and it throws me error whie downloading records as below and none of the records is dwnlded.
    error :Error occurred when setting bind value null on SQL Statement at index 1
    PLEASE LET ME KNOW AS HOW CAN I DEFINE ALL FIVE PARAMTERS FOR A SINGLE VIEW AND RESTRICT MY DOWNLOAD.

    DECLARE
    ln_number NUMBER := 1;
    BEGIN
    BNE_PARAM_DEFNS_PKG.UPDATE_ROW (
      X_APPLICATION_ID => 800,
      X_PARAM_DEFN_CODE =>'PER_BUS_GRP_ID',
      X_OBJECT_VERSION_NUMBER => ln_number,
      X_PARAM_NAME => 'PER:BUS_GRP_ID',
      X_PARAM_SOURCE =>'HR:Download',
      X_PARAM_CATEGORY => 5,
      X_DATATYPE =>1,
      X_ATTRIBUTE_APP_ID => NULL,
      X_ATTRIBUTE_CODE => NULL,
      X_PARAM_RESOLVER => NULL,
      X_DEFAULT_REQUIRED_FLAG => 'N',
      X_DEFAULT_VISIBLE_FLAG =>'Y',-- changed from 'Y' to 'N'
      X_DEFAULT_USER_MODIFYABLE_FLAG =>'Y',
      X_DEFAULT_DATE => NULL,
      X_DEFAULT_NUMBER => NULL,
      X_DEFAULT_BOOLEAN_FLAG => NULL,
      X_DEFAULT_FORMULA => NULL,
      X_VAL_TYPE => 2,
      X_VAL_VALUE =>'XXC_HR_ALL_BG',
      X_MAX_SIZE => 240,
      X_DISPLAY_TYPE => 3,
      X_DISPLAY_STYLE =>1,
      X_DISPLAY_SIZE => 240,
      X_HELP_URL => NULL,
      X_FORMAT_MASK => NULL,
      X_USER_NAME => 'APPS',
      X_DEFAULT_STRING => NULL,
      X_DEFAULT_STRING_TRANS_FLAG =>NULL,
      X_DEFAULT_DESC => NULL,
      X_PROMPT_LEFT => 'Business Group Name',
      X_PROMPT_ABOVE => 'Business Group Name',
      X_USER_TIP => 'Enter Business Group Name',
      X_ACCESS_KEY => NULL,
      X_LAST_UPDATE_DATE => SYSDATE,
      X_LAST_UPDATED_BY => -1,
      X_LAST_UPDATE_LOGIN => -1
    dbms_output.put_line('Value of Object Version Number is : '|| ln_number);
    exception
    when others then
    dbms_output.put_line(SQLERRM);
    end;Edited by: 936671 on Jul 4, 2012 10:51 AM

  • Get a paramete in another jsp

    Hallo
    ihave created two jsp files wth NWDS. They are at the folder dist / PORTAL-INF / jsp
    test1.jsp and test2.jsp.
    test1.jsp:
    <html>
    <body>
    <form action="test2.jsp" method="post">
                             <input type="text" name="PARAMETER" > 
                   <!-- Button  -->
                   <input type="submit" value=" check">
              </form>     
         </body>
    </html>
    And how can I get the PARAMETER in the test2.jsp??
    I have tried it with:
    String passW = request.getAttribute("PARAMETER");
    Edited by: Cilvaring on Jul 14, 2011 1:41 PM
    Edited by: Cilvaring on Jul 14, 2011 1:43 PM

    Hi,
    What is the path you have referred in portal-app.xml and the same path has to be given form action.
    Define the path in portal-app.xml to call the test2.jsp, if possible paste the code portal-app.xml.
    Check this threads as well.
    /thread/1953974 [original link is broken]
    /thread/944477 [original link is broken]
    /message/10263705#10263705 [original link is broken]
    Regards,
    Saleem Mohammad.

  • Can viewObject get a parameter from sessionScope to binding variable?

    hello,
    using Jdev11g ADF Fusion application
    Can viewObject get a parameter from sessionScope and assign into binding variable ? without using executeWithParameter
    Thanks
    greenApple

    A. Safwat,
    As I said before, I was not trying to be offensive, but simply to explain some of the shortcomings of one solution over another. One of the reasons people give such short answers is that many questions (including this one) have been asked and answered many many many times before on the forum. As to my reasons:
    1). Overkill - overkill because you are writing code to do what the framework already provides for you.
    2). Not bind-variable friendly - you are gluing in literals into a SQL statement. That means that Oracle will have to hard parse the query for each new value of the filter clause, yielding to poor performance, particularly in a multiuser environment. It should ideally be done using bind variables.
    3). Insecure (think about what happens if you put "'xyz' or 1=1" into the filterValue there) - not using bind variables is a security hole. Think through what happens if a filter criteria comes through like the one I mentioned.
    4). Inflexible - because you are overriding executeQueryForCollection, this VO becomes inflexible and can only be used in this particular place. Using the declarative approach outlined by Timo is more flexible
    5). Bad (ok, that's my opinion there) - OK, perhaps this was a bit offensive ;)
    Please don't take a critique of a post as offensive, as I assure you it was not intended to be in that spirit. As I mentioned, I greatly appreciate when people point out issues/problems/etc with my ideas, as that is the best way for me to learn. I have in the past written applications that were not bind-variable friendly, and I learned the downsides the hard way (system was horribly non-performant) - I wish someone had reviewed my approach and told me "bad idea" before the application made it into production.
    Respectfully,
    John

  • How can I get a parameter back into a servlet invoked from an IMG tag ?

    I'm using a servlet to create several graphical plots per JSP i.e. per HTML page. Each graph is supposed to be different, according to a parameter which I want to pass back from my JSP. I'm getting several plots but they're all the same!
    I've tried setting an attribute in the session object before each IMG SRC= , but all I get is each plot the same! In fact, my debugging efforts show that the servlet is only called once despite 3 calls, each with a different session parameter value. I'm not sure the session parameter values are getting used properly.
    I just can't find a way of getting a parameter back into my servlet which is invoked from the IMG tag (i.e. SRC= "servlet name").
    Can anyone tell me the best way to pass a parameter back into a servlet which is invoked from an IMG tag? Can the request object be used? I can't, at the moment, see how it could be used?
    I'll certainly be very grateful if anyone can help with this - could even be useful for others as well!

    You said that, "by moving a copy of Mobile Docs back to the Library, from which I had moved it, my documents reapperared in Cloud." That says that you actually moved it. Obviously, I can't tell exactly what you did, but it sounds like you may have thought you were just putting it in the sidebar, but you actually put it somewhere else. The sidebar is not a location to put things, just a way to create a quick shortcut to access a file or folder, so you can't put things "back" from there.

  • J2SE - Get Method Parameter Names

    Hello Gurus,
    I am trying to make a method in Java showing current running method's parameter name, the result will be some kind like below (showed in arrows):
    FUNCTION1()::BEGIN
    -TIME: 12-Jun-2013 05:39
    FUNCTION1()::PARAMETERS
    -PARAM01: val01 <!-------
    -PARAM02: val02 <!-------
    -PARAM03: val03 <!-------
    FUNCTION1()::ERROR
    -PATH: FUNCTION1()«FUNCTION2()«MAIN()
    -MSG : '/ by zero'
    FUNCTION1()::END
    So I want to retrieve the parameter names and values automatically and dynamically using the function. So far, after googling, information that I get is by using spring framework:
    private ParameterNameDiscoverer parameterNameDiscoverer;
    Method m = ... <!------ what should I put here?
    String[] names = parameterNameDiscoverer.getParameterNames(m).
    In my idea, when we call a function, e.g: public String function1(String str, int i) {} and we put the code inside, we will get the function's parameter names which are "str" and "i", also with their current values.
    Any help?

    Knowing the "true name" of the parameter gives one power over it?
    I suppose one could want to create dynamically generated documentation on arbitrary compiled code, or create some user interface to analyze objects/classes at runtime and call methods directly on them through some generically generated input fields. Perhaps as some sort of learning tool.
    In that case, it would be useful to know the parameter names when there's multiple, particularly of the same type. The names ideally would indicate their use... although you can't always assume that.
    Not that I can offer much help if the reflection classes don't provide for it already.

  • How to get the parameter from Java Script into the Parameter crystal Report

    Hi All,
    Crystal Report is integrated with Oracle 10g. I created the base SQL query for col1, col2, col3 and col4. Java Script pass parameter value (185) to Col1.
    My question is how to create crystal report to make Col1 as parameter and how to get the parameter value 185(Col1) from Java Script. Is there any additional code I need to include in the crystal report?
    FYI.
    Java script sends the right parameter value.There is no issue in java script.
    This is an automatic scheduled process when batch runs, Java script should pass the parameter value and the crystal report should get the value and produce the output report.

    Not sure if this is an application question or if you are trying to hook into Crystal Reports parameter UI? If the later then no option other than report design. If an application then I can move this to the Java Forums.
    If you are asking how to alter the parameters I suggest you remove the Java reference and post a new question so it's not confusing the issue.
    Please clarify?

  • I am trying to create another email account with talk talk. and I keep getting a failed message saying 'mail could not log into the mail server talk talk. Yet I already have another email account with talk talk. Not sure what I am doing wrong

    I am trying to create another email account with Talktalk. I already have one account.
    I try to input the new email address and password and get a failed message
    'Mail could not lot into the mail server talktalk.net.
    I have tried several times and keep getting the same message.
    Any ideas

    Accessing your emails from any computer connected to the Internet or from a Smart phone should be straightforward.
    For help on how to set up your e-mail on some of the most common software applications and devices, see How do I set up my TalkTalk email?
    If your software application or device isn't listed, all you need to connect to your TalkTalk e-mail mailbox are the TalkTalk e-mail settings. Make sure you use the right email settings for your specific email address.
    TalkTalk email addresses only
    Login / Username
    [email protected]
    [email protected]
    Incoming mail server
    mail.talktalk.net
    mail.talktalk.net
    Incoming Port
    110
    143
    Outgoing mail server
    smtp.talktalk.net
    smtp.talktalk.net
    Outgoing Port
    587
    587
    Outgoing SSL
    Yes
    Yes
    Outgoing Authentication
    Yes
    Yes

  • I'm trying to set up my iPad2.  I am entering my Apple ID and get a message that says "try another apple id, this ID is already being used.  The only time I've used this Apple ID (my email), is when I bought a mac for my college student.

    I'm trying to set up my iPad2.  I am entering my Apple ID and get a message that says "try another apple id, this ID is already being used.  The only time I've used this Apple ID (my emal) was when I purchased a mac for my college aged child.

    Thank you...I had selected the incorrect option to create an Apple ID....so backing up a few pages and doing as you stated worked!

  • How to get a parameter without name in JSP?

    hi everyone, My question is how to get a parameter without name in JSP? I have two pages, 1.html and 2.jsp.
    in 1.html, I embeds some Javascript codes in HTML contents like below ( changed < to ( , > to )):
    function toSubWin( obj )
    window.open('test.jsp?'+obj.firstChild.toString(),'sw');
    (a onClick='toSubWin(this)'style="background:green")focus(/a)
    How can I get the parameter in 2.jsp?
    THANK YOU IN ADVANCE!!

    Does obj.firstChild.toString() evaluate to a "name=value" type of String ?
    Or better what does obj.firstChild.toString(),'sw' evaluate to ? It has to end up in a name=value format, else its just gibberish appended to the url.
    In the jsp, you have to obviously know the name to get the parameter. There's a getParameterNames() method which returns you a Collection of parameter names as Strings, you could probably use that to retrieve the param values.
    Then there's a getParameterMap() method which returns an immutable Map containing parameter names as keys and parameter values as map values. The keys in the parameter map are of type String. The values in the parameter map are of type String array.
    However to what ends you employ them in a program which doesnt know its inputs is a different story.
    cheers,
    ram.

  • Unable to get the parameter value from a page

    Hi all
    i was trying to get a value using pageContext.getParamter("<item Id>")...
    the itemId which i gave exists in MessageComponentLayout...but i am a null is getting returned..
    please check this...n let me know if i missed something.

    Also confirm, may b no value is set in th bean, thats y its returning null as page parameter. Verify!
    --Mukul                                                                                                                                                                                                                               

  • Possible to get application parameter in value help

    Hello colleagues,
    we developed a value help for business partner to use it in an wda-component . in this value help only those business partner should get supplied where the user has a relationship to . to make it really difficult we can not use the backend user (crm) but the portal user . in the component which uses the value help we achieve to get the user via application parameter from the containing iview but as soon as the user calls the value help this context is lost and we can no longer use the application parameter (which is in fact "out" of the iview) to retrieve the user of the application and therefore get a dump.
    Is there a possibility who to get application parameter of a component in a value help called by this component ?
    Thanks in advance
    Michael

    Hi,
    PLease refer to this link
    http://help.sap.com/saphelp_nw70/helpdata/en/88/266a3e54a2e946e10000000a114084/frameset.htm
    You can enter parameter values for certain screen fields for displaying a SAP transaction here.
    This field is optional.
    The parameter values are specified with the following syntax:
    <Screen_field1>=<Parameter1>
    &<Screen_field2>=<Parameter2>
    Thanks
    Pankaj

Maybe you are looking for