How to implement  Constants of JheadStart Applications

Hello JheadStart Team
we want to gather all constant values of JHS application in one xml file without having to hardcode them in different sections of application (model or view) , and accessing values by binding them anywhere required . Can you give me have any comment or guidline for better decision?
thanks you

We have some constant values that we want to use them in both viewcontroller and model project such as "where clause values" in model or "Query bind paramter " in view controller . in other word we have expression such as "branchcode=:mybranch" that we want alway read :mybranch value from a file (eg xml) file .
Can you give me best practice or proper solution for this matter.
Thank you

Similar Messages

  • Best practices on how to implement logging in custom application

    In the Enterprise Manager it is possible to display/browse the content of different log files generated by the application server modules.
    I have some custom web applications which currently use the log4j framework to write to log files. Is it possible to make these log files accesible for the Enterprise Manager ?
    Or what is the best practice on how to implement logging in custom applications which can be browsed in the Enterprise Manager (I do not want to use system.out)

    I thought that this could be done. An ex- colleague did this - but he didn't tell me how to solve this.
    But as it just took 10 minutes to solve this I believe it's fairly easy.
    cu
    Andreas

  • How to Implement SSL with Oracle Applications R12 without using Load Balanc

    How to Implement SSL with Oracle Applications R12.1.3 without using Load Balancer

    Please refer to (Enabling SSL in Release 12 [ID 376700.1]).
    Thanks,
    Hussein

  • How to implement Help in Swing Application

    Hi..
    In my Swing Application I want to put �Help� for Every field..
    Ex: After Username field ��� if I press �Whatisthis�. I will explain abt the user name field .in a popup text Area
    Thanks
    Cheers
    Mallik

    this may help you...
    http://java.sun.com/products/javahelp/
    regards
    Aniruddha

  • How to implement multiple Value Helps within the same Application ??

    Dear Experts,
    I want to implement multiple value helps in the same view.For that I have declared exporting parameters of type 'wdy_key_value_table.' within the component controller for each of the value helps.While I do activate and test the application I get the following error :
    The following error text was processed in the system HE6 : A row with the same key already exists.
    The error occurred on the application server hsdnt24s11_HE6_00 and in the work process 4 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: VALUESET_BSART of program /1BCWDY/9VSHJWRNR0EZPKFT3ZKC==CP
    Method: IF_PO_VIEW1~VALUESET_BSART of program /1BCWDY/9VSHJWRNR0EZPKFT3ZKC==CP
    Method: WDDOINIT of program /1BCWDY/9VSHJWRNR0EZPKFT3ZKC==CP
    Method: IF_WDR_VIEW_DELEGATE~WD_DO_INIT of program /1BCWDY/9VSHJWRNR0EZPKFT3ZKC==CP
    Method: DO_INIT of program CL_WDR_DELEGATING_VIEW========CP
    Method: INIT_CONTROLLER of program CL_WDR_CONTROLLER=============CP
    Method: INIT_CONTROLLER of program CL_WDR_VIEW===================CP
    Method: INIT of program CL_WDR_CONTROLLER=============CP
    Method: GET_VIEW of program CL_WDR_VIEW_MANAGER===========CP
    Method: BIND_ROOT of program CL_WDR_VIEW_MANAGER===========CP
    I dont know how to implement multiple value helps.Need your help on this.
    Regards,
    Mamai.

    Hi
    Hint is : A row with the same key already exists it means , It is assigning the same value/Key to row and you are calling it at WDDOINIT  so it giving error at the time of initialization .
    Better way to do the coding at some event in view OR if not possible than just execute the first value help in wddoinit later clear all the value before gettig the other Value help. Code it at WdDoModify View to get its run time behaviour.
    BR
    Satish Kumar

  • How to implement google search in portal application

    Hi,
      I am using  "http://api.google.com/GoogleSearch.wsdl" file to implement google search in portal application. but i am not able to get the search result. how to implement google search. is this "http://api.google.com/GoogleSearch.wsdl" is vaild now ?. how to achieve the soultion.
    Regards,
    Shanthakumar.

    Hi Shanthakumar,
    The "GoogleSearch.WSDL" is no longer available as google has replaced it with the new AJAX based searching and they have eventually removed it from public use as well from 7th September 2009. So, I would imagine you would not be able to use the earlier WSDL file for google search. You might have to look in using the new "AJAX Search API". For more information have a look the following links. You can notice "No Longer Available" at the top of the page.
    http://googlecode.blogspot.com/2009/08/well-earned-retirement-for-soap-search.html
    http://code.google.com/apis/soapsearch/api_faq.html#tech15
    I hope this helps you.
    Regards,
    Gopal.

  • How to Implement a Time Limit Feature in an Online Test Application ?

    I am creating an Online Test application. The time limit can be stored for a Test in the database.
    How to implement a time limit such that when the test is started (user clicks on the Start button to go to the fragment containing the Questions) the time left is shown and the test ends (goes to home page) when the timer reaches zero.
    Thanks

    Hi,
    timestamp is a date and thus cannot be used directly to determine seconds passed. So what you need to do is to build the difference between a saved time stamp and the current time.
    http://docs.oracle.com/javase/1.4.2/docs/api/java/sql/Timestamp.html
    So if you have two time stamps, then calling getTime() on each and building the difference gives you a value, which is millisecond. So to get this to an int value you divide it by 1000
    Frank

  • How to implement webdynpro application into portal.

    HI all
    I have developed a Web Dynpro application (for eg: SAP online registration test for tech ED 2007). how to implement it into portal..
    I mean i want it as a role to displayed in my portal.
    what tempalte i have to use while creating iview..
    where i hav  to uplaod this folder (my webDynpro appication) (like a document at bact end or ???)
    please give me step by step solution for this..
    Thank&regards
    Gayathri

    Hi,
    Assuming you have deployed your webdynpro, you simply need to create webdynpro iView in portal.
    Check this simple help documentation on how to create the iView
    http://help.sap.com/saphelp_nw04s/helpdata/en/13/b4dc4281de2878e10000000a155106/content.htm
    Once you have created the iView, create a role. Set the entry point of the role to yes.
    http://help.sap.com/saphelp_nw04s/helpdata/en/f6/29cf3d4f902d10e10000000a114084/content.htm
    Right click on the iView and assign the iView to the role.
    Best Regards,
    Prasanna Krishnamurthy

  • How to implement start & stop ai triggers when # scans unknown

    I can't seem to find an implementation example for this application.
    Some are close but seem to have a big gap on close examination.
    The application is to log an unknown number of samples for a
    single rotation of a variable speed drum. The drum is connected
    to a tachometer which generates 1 pulse per revolution and is the
    trigger source.
    The user will initiate the data collection and only a single
    rotation's
    worth of data need be collected and displayed.
    The board is a PCI 6111E sampling a single input at ~2 Megahz.
    All the examples I've found using a start and stop trigger depend
    on knowing how many scans to acquire.
    Is there any way to get around that? It seems so simple to
    have a
    start and stop pulse, a scan rate constant, and just get
    the data out of a buffer. But it does not seem to be that simple
    or am I missing something here?
    There is also an issue with the identical tach signal being used
    for both the start and stop trigger. I think that can be gotten
    around by using a divide by n counter and feeding that to
    trigger config vi but if anyone has any suggestions for that,
    they would be greatly appreciated.
    Gene Couch

    I'm afraid I can't help you beyond that. We use NI boards and NI-DAQ library
    of functions in custom control systems with software written in C++. I have
    not had opportunity to use LabView. Sorry.
    gcouch wrote:
    >On 5 Jun 2000 09:38:46 -0500, "J. Wolters" >wrote>Thank
    you for the response but I'm not sure what the DAQ_Rate function>is. With
    LabVIEW 5.1 it does not appear in the DAQ pallette and I>cannot find it in
    the example vi's. Do you know where it can be>found?>>>>>>Have you looked
    that DAQ_Rate function? You should be able to use this function>>to obtain
    your # of samples.>>>>>>gcouch wrote>>I can't seem
    to find an implementation example for this application.>Some>>a
    re close but
    seem to have a big gap on close examination.>>The application>>is to log
    an unknown number of samples for a >single rotation of a variable>>speed
    drum. The drum is connected>to a tachometer which generates 1 pulse>>per
    revolution and is the>trigger source.>>The user will initiate the data>>collection
    and only a single>rotation's>worth of data need be collected and>>displayed.>>The
    board is a PCI 6111E sampling a single input at ~2 Megahz.>> >>All the examples
    I've found using a start and stop trigger depend>on knowing>>how many scans
    to acquire.>>Is there any way to get around that? It seems>>so simple to>have
    a start and stop pulse, a scan rate constant, and just>>get>the data out
    of a buffer. But it does not seem to be that simple>or>>am I missing something
    here?>>There is also an issue with the identical tach>>signal being used>for
    both the start and stop trigger. I think that can>>be gotten>around by using
    a divide by n counter and feeding that to>trigger>>config v
    i but if anyone
    has any suggestions for that,>they would be greatly>>appreciated.>>Gene Couch>>>

  • How can I interface a Java application which is not running under NetDynamics, to use the EJBs in a NetDynamics application?

    One of them uses Enterprise Java Beans implemented with a SUN NetDynamics application server. The other is a straight Java application. Ideally I want the second application to remotely invoke methods on the existing Java beans, so the existing business logic will not be duplicated.
    This would seem to be simple, but NetDynamics appears to substitute some proprietary code for part of the EJB interface, and it is not immediately obvious how to let "foreign" java programs access the beans.
    I would appreciate it if anyone is able to provide any information on how to achieve this. If you know of any sample code that I could look at, that would be a help too. This may (or may not) be known to SUN as a "stand alone java client".

    hi,
    can someone help me how to implement logging for method entry parameters and
    method exit return value.
    can someone help me how to use log4j and integrate it to the method entry
    logging and method exit logging.
    Here what i need is without writing the log statements for the method entry and
    method exit i need to log it to the file
    along with other log4j debug statements i provide in the file.I should be able
    to configure whether to enable/disable the logging
    for method entry and method exit. In method entry i should be able to log the
    parameters the method take and in method exit
    i should be able to log te return value to the log file, before the method is
    returned to the callee.
    i hope i am clear
    Thanks in advance.

  • How can i built a java application using java debug class on Log4J

    Hi,
    As java API support the MethodEntryEvent, using which I can get the automatic logging statements when the method is entered or exited as HelloExample.main(with argument type).
    Where HelloExample is the class name.
    Main is the method entered with its argument types.
    In some cases I have the o/p as
    -- VM Started --
    ====== main ======
    main -- HelloExample
    callerMethod -- HelloExample
    ====== main end ======
    -- The application exited --
    By using Log4J is there any possibility of getting these sort of o/p along with the loggers supported by Log4J. i mean to say can i built an java application which supports the MethodEntryEvent and MethodExitEvent from java API and also uses the Log4J debugging. I took an e.g. trace example, which (in J2SE 1.4.x or 5.x) will be found in $JAVA_HOME/demo/jpda/examples.jar and unpacking it by
    jar -xvf $JAVA_HOME/demo/jpda/examples.jar i found the com/sun/tools/example/trace/Trace.java and passed the class constructed with logger taken from Log4J. In this case the logging message is displayed on the console. As per the requirement i need to transfer the whole o/p to an output file along with Log4J logger statements. in this case i should not give any command in the cosule except compiling and executing the programme. the programm also should able to run without the main() as i need to integrate Log4J with an application and the code must me application server independent. i need the output as i got using MethodEnteryEvent (shown as above) in case of java application built using Log4J.
    Can any one help me in this regard. can any one give me some suggestion or any programme of this sort. All suggestions are welcomed.
    Thanks & Regards,

    hi,
    can someone help me how to implement logging for method entry parameters and
    method exit return value.
    can someone help me how to use log4j and integrate it to the method entry
    logging and method exit logging.
    Here what i need is without writing the log statements for the method entry and
    method exit i need to log it to the file
    along with other log4j debug statements i provide in the file.I should be able
    to configure whether to enable/disable the logging
    for method entry and method exit. In method entry i should be able to log the
    parameters the method take and in method exit
    i should be able to log te return value to the log file, before the method is
    returned to the callee.
    i hope i am clear
    Thanks in advance.

  • How to implement Strategy pattern in ABAP Objects?

    Hello,
    I have a problem where I need to implement different algorithms, depending on the type of input. Example: I have to calculate a Present Value, sometimes with payments in advance, sometimes payment in arrear.
    From documentation and to enhance my ABAP Objects skills, I would like to implement the strategy pattern. It sounds the right solution for the problem.
    Hence I need some help in implementing this pattern in OO. I have some basic OO skills, but still learning.
    Has somebody already implemented this pattern in ABAP OO and can give me some input. Or is there any documentation how to implement it?
    Thanks and regards,
    Tapio

    Keshav has already outlined required logic, so let me fulfill his answer with a snippet
    An Interface
    INTERFACE lif_payment.
      METHODS pay CHANGING c_val TYPE p.
    ENDINTERFACE.
    Payment implementations
    CLASS lcl_payment_1 DEFINITION.
      PUBLIC SECTION.
      INTERFACES lif_payment.
      ALIASES pay for lif_payment~pay.
    ENDCLASS.                 
    CLASS lcl_payment_2 DEFINITION.
      PUBLIC SECTION.
      INTERFACES lif_payment.
      ALIASES pay for lif_payment~pay.
    ENDCLASS.                   
    CLASS lcl_payment_1 IMPLEMENTATION.
      METHOD pay.
        "do something with c_val i.e.
        c_val = c_val - 10.
      ENDMETHOD.                   
    ENDCLASS.                  
    CLASS lcl_payment_2 IMPLEMENTATION.
      METHOD pay.
        "do something else with c_val i.e.
        c_val = c_val + 10.
      ENDMETHOD.  
    Main class which uses strategy pattern
    CLASS lcl_main DEFINITION.
      PUBLIC SECTION.
        "during main object creation you pass which payment you want to use for this object
        METHODS constructor IMPORTING ir_payment TYPE REF TO lif_payment.
        "later on you can change this dynamicaly
        METHODS set_payment IMPORTING ir_payment TYPE REF TO lif_payment.
        METHODS show_payment_val.
        METHODS pay.
      PRIVATE SECTION.
        DATA payment_value TYPE p.
        "reference to your interface whcih you will be working with
        "polimorphically
        DATA mr_payment TYPE REF TO lif_payment.
    ENDCLASS.                  
    CLASS lcl_main IMPLEMENTATION.
      METHOD constructor.
        IF ir_payment IS BOUND.
          me->mr_payment = ir_payment.
        ENDIF.
      ENDMETHOD.                  
      METHOD set_payment.
        IF ir_payment IS BOUND.
          me->mr_payment = ir_payment.
        ENDIF.
      ENDMETHOD.                  
      METHOD show_payment_val.
        WRITE /: 'Payment value is now ', me->payment_value.
      ENDMETHOD.                  
      "hide fact that you are using composition to access pay method
      METHOD pay.
        mr_payment->pay( CHANGING c_val = payment_value ).
      ENDMETHOD.                   ENDCLASS.                  
    Client application
    PARAMETERS pa_pay TYPE c. "1 - first payment, 2 - second
    DATA gr_main TYPE REF TO lcl_main.
    DATA gr_payment TYPE REF TO lif_payment.
    START-OF-SELECTION.
      "client application (which uses stategy pattern)
      CASE pa_pay.
        WHEN 1.
          "create first type of payment
          CREATE OBJECT gr_payment TYPE lcl_payment_1.
        WHEN 2.
          "create second type of payment
          CREATE OBJECT gr_payment TYPE lcl_payment_2.
      ENDCASE.
      "pass payment type to main object
      CREATE OBJECT gr_main
        EXPORTING
          ir_payment = gr_payment.
      gr_main->show_payment_val( ).
      "now client doesn't know which object it is working with
      gr_main->pay( ).
      gr_main->show_payment_val( ).
      "you can also use set_payment method to set payment type dynamically
      "client would see no change
      if pa_pay = 1.
        "now create different payment to set it dynamically
        CREATE OBJECT gr_payment TYPE lcl_payment_2.
        gr_main->set_payment( gr_payment ).
        gr_main->pay( ).
        gr_main->show_payment_val( ).
      endif.
    Regads
    Marcin

  • How to implement a single sign on  feature using java.

    Hi,
    I have a question like , How to implement **single sign on** feature in java without using any third party framework or tool like LDAP or any other which is available in the market.
    Actually the situation is i have all security information into the table and those information is used for single sign on . If a user logged in from a jsp loging page all the security role should be assigned to that particular user.
    We can do this using LDAP but i am not supposed to use the LDAP or any third party tool . I have to write a java class for that .
    please suggest me the method , how to implement this in a web application.
    Edited by: Rakesh_Singh on Mar 19, 2008 11:55 AM

    you could setup a token that specifies a user is authenticated. other applications that u want SSO can check for existance of this token
    if it is HTTP - you can save the token as a cookie and downstream apps look for this token
    yr code needs to validate that the token/cookie was indeed a valid one and not subject to man-in-the middle attack.

  • How to implement a 1-n relationship

    I'm using oracle 8.1 and currently learning JDO.
    Havin the following schema :
    DROP TABLE permission_group_map CASCADE CONSTRAINTS;
    CREATE TABLE permission_group_map (
    permission_group_map_oid NUMBER(10) NOT NULL,
    version_oid NUMBER(3) NOT NULL,
    group_oid NUMBER(10) NOT NULL,
    permission_oid NUMBER(10) NOT NULL,
    jdolock NUMBER NULL,
    user_id VARCHAR2(20) NULL,
    timestamp DATE NULL
    ALTER TABLE permission_group_map
    ADD ( CONSTRAINT PKpermission_group_map PRIMARY KEY (
    permission_group_map_oid) ) ;
    DROP TABLE permission CASCADE CONSTRAINTS;
    CREATE TABLE permission (
    permission_oid NUMBER(10) NOT NULL,
    version_oid NUMBER(3) NOT NULL,
    name VARCHAR2(60) NULL,
    visibility NUMBER(1) NULL,
    jdolock NUMBER NULL,
    user_id VARCHAR2(20) NULL,
    timestamp DATE NULL
    ALTER TABLE permission
    ADD ( CONSTRAINT PKpermission PRIMARY KEY (permission_oid,
    version_oid) ) ;
    DROP TABLE user_group CASCADE CONSTRAINTS;
    CREATE TABLE user_group (
    group_oid NUMBER(10) NOT NULL,
    name VARCHAR2(60) NULL,
    jdolock NUMBER NULL,
    user_id VARCHAR2(20) NULL,
    timestamp DATE NULL
    ALTER TABLE user_group
    ADD ( CONSTRAINT PKuser_group PRIMARY KEY (group_oid) ) ;
    ALTER TABLE permission_group_map
    ADD ( CONSTRAINT fk2_permission_group_map
    FOREIGN KEY (group_oid)
    REFERENCES user_group ) ;
    ALTER TABLE permission_group_map
    ADD ( CONSTRAINT fk1_permission_group_map
    FOREIGN KEY (permission_oid, version_oid)
    REFERENCES permission ) ;
    How can represent a 1-n relation in a .jdo file without adding more fileds.
    Here is my .jdo implementation
    <class identity-type="application" name="UserGroup"
    objectid-class="UserGroupKey" requires-extent="false">
    <extension key="table" value="USER_GROUP" vendor-name="kodo"/>
    <field name="name" null-value="exception" primary-key="false">
    <extension key="data-column" value="NAME"
    vendor-name="kodo"/>
    <extension key="column-length" value="60"
    vendor-name="kodo"/>
    </field>
    <field name="userId" null-value="exception"
    primary-key="false">
    <extension key="data-column" value="USER_ID"
    vendor-name="kodo"/>
    </field>
    <field name="groupOid" null-value="exception"
    primary-key="true">
    <extension key="data-column" value="GROUP_OID"
    vendor-name="kodo"/>
    </field>
    <field name="timestamp" null-value="exception"
    primary-key="false">
    <extension key="data-column" value="TIMESTAMP"
    vendor-name="kodo"/>
    </field>
    <field name = "permissionGroupMap">
    <collection element-type="PermissionGroupMap"/>
    <extension vendor-name="kodo" key="inverse"
    value="userGroup"/>
    </field>
    <extension key="lock-column" value="jdolock"
    vendor-name="kodo"/>
    <extension key="class-column" value="none" vendor-name="kodo"/>
    </class>
    <class identity-type="application" name="PermissionGroupMap"
    objectid-class="PermissionGroupMapKey" requires-extent="false">
    <extension key="table" value="PERMISSION_GROUP_MAP"
    vendor-name="kodo"/>
    <extension key="lock-column" value="jdolock"
    vendor-name="kodo"/>
    <extension key="class-column" value="none" vendor-name="kodo"/>
    <field name="permissionGroupMapOid" null-value="exception"
    primary-key="true">
    <extension key="data-column"
    value="PERMISSION_GROUP_MAP_OID" vendor-name="kodo"/>
    </field>
    <field name="userId" null-value="exception"
    primary-key="false">
    <extension key="data-column" value="USER_ID"
    vendor-name="kodo"/>
    </field>
    <field name="permissionOid" null-value="exception"
    primary-key="false">
    <extension key="data-column" value="PERMISSION_OID"
    vendor-name="kodo"/>
    </field>
    <field name="groupOid" null-value="exception"
    primary-key="false">
    <extension key="data-column" value="GROUP_OID"
    vendor-name="kodo"/>
    </field>
    <field name="versionOid" null-value="exception"
    primary-key="false">
    <extension key="data-column" value="VERSION_OID"
    vendor-name="kodo"/>
    </field>
    <field name="timestamp" null-value="exception"
    primary-key="false">
    <extension key="data-column" value="TIMESTAMP"
    vendor-name="kodo"/>
    </field>
    </class>
    and here is the class code
    public class PermissionGroupMap {
    java.math.BigDecimal permissionGroupMapOid;
    java.lang.String userId;
    java.math.BigDecimal permissionOid;
    java.math.BigDecimal groupOid;
    java.math.BigDecimal versionOid;
    java.util.Date timestamp;
    /** relationship fields **/
    UserGroup userGroup;
    public class UserGroup {
    java.lang.String name;
    java.lang.String userId;
    java.math.BigDecimal groupOid;
    java.util.Date timestamp;
    /** relationship fields **/
    ArrayList permissionGroupMap = new ArrayList();
    Here is the exception that I'm getting :
    javax.jdo.JDODataStoreException: [SQL=SELECT t0.PERMISSION_GROUP_MAP_OID,
    t0.jdolock, t0.GROUP_OID, t0.PERMISSION_OID, t0.TIMESTAMP,
    t0.GROUPOID_USERGROUPX, t0.USER_ID, t0.VERSION_OID FROM
    PERMISSION_GROUP_MAP t0 WHERE t0.GROUPOID_USERGROUPX = 1] ORA-00904:
    invalid column name

    Thanks for you quick response, But I changed the schema a little bit, just
    to play arround, now I'm doing a m-n, but it does not work, can you tell
    me what I'm doing wrong, here is the schema :
    CREATE TABLE user_group (
    group_oid NUMBER(10) NOT NULL,
    name VARCHAR2(60) NULL,
    jdolock NUMBER NULL,
    user_id VARCHAR2(20) NULL,
    timestamp DATE NULL,
    CONSTRAINT PKuser_group
    PRIMARY KEY (group_oid)
    CREATE TABLE permission (
    permission_oid NUMBER(10) NOT NULL,
    version_oid NUMBER(3) NOT NULL,
    name VARCHAR2(60) NULL,
    visibility NUMBER(1) NULL,
    jdolock NUMBER NULL,
    user_id VARCHAR2(20) NULL,
    timestamp DATE NULL,
    CONSTRAINT PKpermission
    PRIMARY KEY (permission_oid, version_oid)
    CREATE TABLE permission_group_map (
    group_oid NUMBER(10) NOT NULL,
    permission_oid NUMBER(10) NOT NULL,
    version_oid NUMBER(3) NOT NULL,
    CONSTRAINT PKpermission_group_map
    PRIMARY KEY (group_oid, permission_oid, version_oid),
    CONSTRAINT R_4
    FOREIGN KEY (permission_oid, version_oid)
    REFERENCES permission,
    CONSTRAINT R_3
    FOREIGN KEY (group_oid)
    REFERENCES user_group
    the .jod file :
    <class identity-type="application" name="Permission"
    objectid-class="PermissionKey" requires-extent="false">
    <extension key="table" value="PERMISSION" vendor-name="kodo"/>
    <field name="permissionOid" null-value="exception"
    persistence-modifier="persistent" primary-key="true">
    <extension key="data-column" value="PERMISSION_OID"
    vendor-name="kodo"/>
    <extension key="column-length" value="10"
    vendor-name="kodo"/>
    <extension key="column-index" value="pkPermission"
    vendor-name="kodo"/>
    </field>
    <field name="versionOid" null-value="exception"
    persistence-modifier="persistent" primary-key="true">
    <extension key="data-column" value="VERSION_OID"
    vendor-name="kodo"/>
    <extension key="column-index" value="pkPermission"
    vendor-name="kodo"/>
    <extension key="column-length" value="3"
    vendor-name="kodo"/>
    </field>
    <field name="userGroups">
    <collection element-type="UserGroup"/>
    <extension vendor-name="kodo" value="permissions"/>
    <extension vendor-name="kodo" key="table"
    value="PERMISSION_GROUP_MAP"/>
    <extension vendor-name="kodo" key="groupOid-data-column"
    value="GROUP_OID"/>
    <extension vendor-name="kodo"
    key="permissionOid-ref-column" value="PERMISSION_OID"/>
    <extension vendor-name="kodo" key="versionOid-ref-column"
    value="VERSION_OID"/>
    </field>
    <extension key="class-column" value="none" vendor-name="kodo"/>
    <extension key="lock-column" value="jdolock"
    vendor-name="kodo"/>
    </class>
    <class identity-type="application" name="UserGroup"
    objectid-class="UserGroupKey" requires-extent="false">
    <extension key="table" value="USER_GROUP" vendor-name="kodo"/>
    <field name="name" null-value="exception" primary-key="false">
    <extension key="data-column" value="NAME"
    vendor-name="kodo"/>
    <extension key="column-length" value="60"
    vendor-name="kodo"/>
    </field>
    <field name="permissions">
    <extension vendor-name="kodo" value="userGroups"/>
    <extension vendor-name="kodo" key="table"
    value="PERMISSION_GROUP_MAP"/>
    <extension vendor-name="kodo" key="groupOid-ref-column"
    value="GROUP_OID"/>
    <extension vendor-name="kodo"
    key="permissionOid-data-column" value="PERMISSION_OID"/>
    <extension vendor-name="kodo" key="versionOid-data-column"
    value="VERSION_OID"/>
    </field>
    <extension key="lock-column" value="jdolock"
    vendor-name="kodo"/>
    <extension key="class-column" value="none" vendor-name="kodo"/>
    </class>
    CODE :
    public class Permission {
         java.math.BigDecimal visibility;
         java.lang.String name;
         java.lang.String userId;
         java.math.BigDecimal permissionOid;
         java.math.BigDecimal versionOid;
         java.util.Date timestamp;
    private Collection userGroups = new ArrayList();
    public class UserGroup {
         java.lang.String name;
         java.lang.String userId;
         java.math.BigDecimal groupOid;
         java.util.Date timestamp;
    Collection permissions = new ArrayList();
    Patrick Linskey wrote:
    Manuel,
    When mapping relations to pre-defined schemas using application identity,
    you must use the '<fieldname>-data-column' extension syntax discussed in
    http://www.solarmetric.com/Software/Documentation/2.2.6/manual.html#metadata
    _extensions.
    Additionally, in general, you should not have foreign key fields declared in
    your java code as well as relations to other objects. For example, in
    PermissionGroupMap, you should just have a relation to UserGroup, and no
    groupOid field -- the foreign key information will be handled by JDO, and
    should not be user-accessible except through the UserGroup relation.
    So, something like this is probably more like what you want (I've removed
    some fields for brevity):
    <class identity-type="application" name="UserGroup"
    objectid-class="UserGroupKey" requires-extent="false">
    <field name="groupOid" null-value="exception" primary-key="true">
    <extension key="data-column" value="GROUP_OID"
    vendor-name="kodo"/>
    </field>
    <field name = "permissionGroupMap">
    <collection element-type="PermissionGroupMap"/>
    <extension vendor-name="kodo" key="inverse" value="userGroup"/>
    </field>
    </class>
    <class identity-type="application" name="PermissionGroupMap"
    objectid-class="PermissionGroupMapKey" requires-extent="false">
    <field name="permissionGroupMapOid" null-value="exception"
    primary-key="true">
    <extension key="data-column" value="PERMISSION_GROUP_MAP_OID"
    vendor-name="kodo"/>
    </field>
    <field name="userGroup" null-value="exception" primary-key="false">
    <extension key="groupOid-data-column" value="GROUP_OID"
    vendor-name="kodo"/>
    </field>
    </class>
    public class PermissionGroupMap {
    java.math.BigDecimal permissionGroupMapOid;
    // this is not needed: java.math.BigDecimal groupOid;
    /** relationship fields **/
    UserGroup userGroup;
    public class UserGroup {
    java.math.BigDecimal groupOid;
    /** relationship fields **/
    ArrayList permissionGroupMap = new ArrayList();
    On 6/8/02 11:56 AM, "Manuel Ledesma" <[email protected]> wrote:
    I'm using oracle 8.1 and currently learning JDO.
    Havin the following schema :
    DROP TABLE permission_group_map CASCADE CONSTRAINTS;
    CREATE TABLE permission_group_map (
    permission_group_map_oid NUMBER(10) NOT NULL,
    version_oid NUMBER(3) NOT NULL,
    group_oid NUMBER(10) NOT NULL,
    permission_oid NUMBER(10) NOT NULL,
    jdolock NUMBER NULL,
    user_id VARCHAR2(20) NULL,
    timestamp DATE NULL
    ALTER TABLE permission_group_map
    ADD ( CONSTRAINT PKpermission_group_map PRIMARY KEY (
    permission_group_map_oid) ) ;
    DROP TABLE permission CASCADE CONSTRAINTS;
    CREATE TABLE permission (
    permission_oid NUMBER(10) NOT NULL,
    version_oid NUMBER(3) NOT NULL,
    name VARCHAR2(60) NULL,
    visibility NUMBER(1) NULL,
    jdolock NUMBER NULL,
    user_id VARCHAR2(20) NULL,
    timestamp DATE NULL
    ALTER TABLE permission
    ADD ( CONSTRAINT PKpermission PRIMARY KEY (permission_oid,
    version_oid) ) ;
    DROP TABLE user_group CASCADE CONSTRAINTS;
    CREATE TABLE user_group (
    group_oid NUMBER(10) NOT NULL,
    name VARCHAR2(60) NULL,
    jdolock NUMBER NULL,
    user_id VARCHAR2(20) NULL,
    timestamp DATE NULL
    ALTER TABLE user_group
    ADD ( CONSTRAINT PKuser_group PRIMARY KEY (group_oid) ) ;
    ALTER TABLE permission_group_map
    ADD ( CONSTRAINT fk2_permission_group_map
    FOREIGN KEY (group_oid)
    REFERENCES user_group ) ;
    ALTER TABLE permission_group_map
    ADD ( CONSTRAINT fk1_permission_group_map
    FOREIGN KEY (permission_oid, version_oid)
    REFERENCES permission ) ;
    How can represent a 1-n relation in a .jdo file without adding more fileds.
    Here is my .jdo implementation
    <class identity-type="application" name="UserGroup"
    objectid-class="UserGroupKey" requires-extent="false">
    <extension key="table" value="USER_GROUP" vendor-name="kodo"/>
    <field name="name" null-value="exception" primary-key="false">
    <extension key="data-column" value="NAME"
    vendor-name="kodo"/>
    <extension key="column-length" value="60"
    vendor-name="kodo"/>
    </field>
    <field name="userId" null-value="exception"
    primary-key="false">
    <extension key="data-column" value="USER_ID"
    vendor-name="kodo"/>
    </field>
    <field name="groupOid" null-value="exception"
    primary-key="true">
    <extension key="data-column" value="GROUP_OID"
    vendor-name="kodo"/>
    </field>
    <field name="timestamp" null-value="exception"
    primary-key="false">
    <extension key="data-column" value="TIMESTAMP"
    vendor-name="kodo"/>
    </field>
    <field name = "permissionGroupMap">
    <collection element-type="PermissionGroupMap"/>
    <extension vendor-name="kodo" key="inverse"
    value="userGroup"/>
    </field>
    <extension key="lock-column" value="jdolock"
    vendor-name="kodo"/>
    <extension key="class-column" value="none" vendor-name="kodo"/>
    </class>
    <class identity-type="application" name="PermissionGroupMap"
    objectid-class="PermissionGroupMapKey" requires-extent="false">
    <extension key="table" value="PERMISSION_GROUP_MAP"
    vendor-name="kodo"/>
    <extension key="lock-column" value="jdolock"
    vendor-name="kodo"/>
    <extension key="class-column" value="none" vendor-name="kodo"/>
    <field name="permissionGroupMapOid" null-value="exception"
    primary-key="true">
    <extension key="data-column"
    value="PERMISSION_GROUP_MAP_OID" vendor-name="kodo"/>
    </field>
    <field name="userId" null-value="exception"
    primary-key="false">
    <extension key="data-column" value="USER_ID"
    vendor-name="kodo"/>
    </field>
    <field name="permissionOid" null-value="exception"
    primary-key="false">
    <extension key="data-column" value="PERMISSION_OID"
    vendor-name="kodo"/>
    </field>
    <field name="groupOid" null-value="exception"
    primary-key="false">
    <extension key="data-column" value="GROUP_OID"
    vendor-name="kodo"/>
    </field>
    <field name="versionOid" null-value="exception"
    primary-key="false">
    <extension key="data-column" value="VERSION_OID"
    vendor-name="kodo"/>
    </field>
    <field name="timestamp" null-value="exception"
    primary-key="false">
    <extension key="data-column" value="TIMESTAMP"
    vendor-name="kodo"/>
    </field>
    </class>
    and here is the class code
    public class PermissionGroupMap {
    java.math.BigDecimal permissionGroupMapOid;
    java.lang.String userId;
    java.math.BigDecimal permissionOid;
    java.math.BigDecimal groupOid;
    java.math.BigDecimal versionOid;
    java.util.Date timestamp;
    /** relationship fields **/
    UserGroup userGroup;
    public class UserGroup {
    java.lang.String name;
    java.lang.String userId;
    java.math.BigDecimal groupOid;
    java.util.Date timestamp;
    /** relationship fields **/
    ArrayList permissionGroupMap = new ArrayList();
    Here is the exception that I'm getting :
    javax.jdo.JDODataStoreException: [SQL=SELECT t0.PERMISSION_GROUP_MAP_OID,
    t0.jdolock, t0.GROUP_OID, t0.PERMISSION_OID, t0.TIMESTAMP,
    t0.GROUPOID_USERGROUPX, t0.USER_ID, t0.VERSION_OID FROM
    PERMISSION_GROUP_MAP t0 WHERE t0.GROUPOID_USERGROUPX = 1] ORA-00904:
    invalid column name
    Patrick Linskey [email protected]
    SolarMetric Inc. http://www.solarmetric.com

  • How to implement this attribute ?

    Hi,
    I've this problem.
    In our application to control healthcare expense I've implemented a cube with 6 dimensions. (here for who knows Italian : http://www.oracle.com/global/it/customers/profiles/profile_77.html )
    The biggest dimension is the "patient" one, with 1.500.000 units at 5th level, grouped in geographic aggregates, until the entire city at highest level.
    Now customers wants to have the possibility to select patiens with chronic disease from these. There are about 500 kinds of chronic diseases.
    Every patient can have no one, one, or (and this is the problem) more then one of these chronic disease.
    How to try to implement this? as a new dimensions or as an attribute ?
    I've thought that best way is to introduce a new (chronic diseases) dimension, to have a way to select one or more of these diseases at all levels of patient dimension.
    I'm asking how to solve the problem that a single patien can also have more than one disease.
    Is there any way to implement this ?

    thanks to everyone for the answers
    I've some questions.
    to olapworld:
    have you any sample code to show me how to implement the dimensionalized valueset and the customizations needed ??
    to scott:
    I think I'm not understanding your suggestion:
    my target is to add the "ilnesses" selection to other ones. The most important cube of my applications analyze
    healthcare expenses from six dimensions. Customer wants analyze cube "adding" a way to select only "ilnesses" patients and elvaluate their expense.
    I'm in doubt becouse a patient can also have more then one ilness, so I can't simply add a "ilnesses" dimensions to the cube and mapping it to an "ilness_id" in the fact table.
    How can the two dimensioned cube to help me in this ?
    to Rafalm1:
    in any case, implementing Count(Distinct patient) would be useful for me, to have a way to count the number of patients who had a healthcae assistence. Can you suggest me how to implement this ?

Maybe you are looking for

  • How to clear the cache in the portal browser

    Hello Experts, Iam unable to clear the cache in the portal. I tried  clearing the Navigation cache , PRT cache,PCD cache,Database cache,UME cache. The senario is in the browser if iam logging with some user X , he should see only 1,2,3 countries, and

  • IPod Mini doesn't show up in ITunes and won't upload songs.

    My iPod Mini shows up on my computer, but it doesn't ever show up in ITunes. I am using a computer that already had ITunes installed and was used by my sisters iPod. Does this matter? The manual says ITunes should open automatically and then transfer

  • Disable a service from a predefined role of a business package

    Hi, I want to disable few services from the a predefined role of material planner .Can  anyone suggest how to disable few services from the user

  • SSL, POP3, and SMTP

    I keep getting emails from about setting SSL settings for POP3 and SMTP.  I have it configured on my main email settings for my client.  Do I have to set it as well for my Blackberry? And if so how? Solved! Go to Solution.

  • JTable does not scroll

    Hi I have a JTabbedPane. One of the panes is a "resultPane" on which I put a "JScrollpaneResult" which keeps a "JScrollPaneTable". Showhorizonta?SCrollbars are AS_NEEDED BUT the schrollbar wil bee shown always, and resizing tabelcolumns does not affe