What query should be created for this case

Here are those classes:
Folder{
    String name;
    @ManyToOne
    Subject owner;
Subject {
    String name;
}What query should I create in order to: find out if there is an actual Folder for a Subject with the name X in the database ?
Actually, the question is kinda stupid, but im not experienced with queries....

javaUserMuser wrote:
Here are those classes:
Folder{
String name;
@ManyToOne
Subject owner;
Subject {
String name;
}What query should I create in order to: find out if there is an actual Folder for a Subject with the name X in the database ?Can't tell based on the info you posted. These are Java objects, and queries deal with relational tables.
Your naming is confusing. Subject and owner are two very different things.
If I had two tables like this:
CREATE TABLE IF NOT EXISTS owners
    owner_id bigint not null auto_increment,
    name varchar(80),
    primary key(owner_id)
CREATE TABLE IF NOT EXISTS folders
    folder_id bigint not null auto_increment,
    name varchar(80),
    owner_id bigint   
    primary key(folder_id),
    foreign key(owner_id) references(owners)
);I'd write the JOIN query this way:
SELECT f.name, o.name
FROM folders as f, owners as o
WHERE o.owner_id = ?
AND o.owner_id = f.owner_idYou realize, of course, that if you're using EJB3 as the annotations suggest, that you don't write any SQL. EJB3 generates it dynamically for you.
%

Similar Messages

  • What Indexes should be created for improve performance of the sql query

    Hello Admins
    One of my user is facing slow performance issue while running the below query. Can someone, please guide me for the same. I want to know, what indexes should be created to improve the performance of this query. Also what else can be done to achieve the same.
    SQL Query:-
    SELECT UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.PO_NUMBER))),
    CGSBI_SHIP_DIST_S_EXTRACT.PO_LINE_NUMBER,
    CGSBI_SHIP_DIST_S_EXTRACT.PO_SHIPMENT_NUMBER,
    CGSBI_SHIP_DIST_S_EXTRACT.PO_LINE_SHIP_DIST_NUMBER,
    CGSBI_SHIP_DIST_S_EXTRACT.DISTRIBUTION_DATE,
    UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.PO_LINE_SHIP_DIST_LINE_ID))),
    UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.PROJECT_ID))),
    UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.ACCOUNT_DISTRIBUTION_CODE))),
    UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.ORACLE_ACCOUNT_NUMBER))),
    UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.COMPONENT_CODE))),
    UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.TRANSACTION_CURRENCY_CODE))),
    CGSBI_SHIP_DIST_S_EXTRACT.ORDER_QUANTITY, UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.ORDER_UOM))),
    CGSBI_SHIP_DIST_S_EXTRACT.UNIT_PRICE_TRX_CURRENCY,
    UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.EXPENSE_TYPE_INDICATOR))),
    CGSBI_SHIP_DIST_S_EXTRACT.SOR_ID,
    UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.PO_LINE_ITEM_CODE))),
    UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.PO_LINE_ITEM_DESC))),
    CGSBI_SHIP_DIST_S_EXTRACT.PO_LINE_ITEM_LEAD_TIME,
    UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.UNSPSC_CODE))),
    UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.BUYER_ID))),
    UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.REQUESTOR_ID))),
    UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.APPROVER_ID))),
    UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.SUPPLIER_SITE_ID))),
    UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.SUPPLIER_GSL_NUMBER))),
    UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.SHIP_TO_LOCATION_CODE))),
    UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.TASK_ID))),
    (LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.PO_RELEASE_ID)))
    FROM
    CGSBI_SHIP_DIST_S_EXTRACT
    WHERE PO_NUMBER IS NOT NULL;
    I generated the explain plan for this query and found the following:-
    Explain Plan:-
    SQL> explain plan for SELECT UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.PO_NUMBER))),
    2 CGSBI_SHIP_DIST_S_EXTRACT.PO_LINE_NUMBER,
    3 CGSBI_SHIP_DIST_S_EXTRACT.PO_SHIPMENT_NUMBER,
    4 CGSBI_SHIP_DIST_S_EXTRACT.PO_LINE_SHIP_DIST_NUMBER,
    5 CGSBI_SHIP_DIST_S_EXTRACT.DISTRIBUTION_DATE,
    6 UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.PO_LINE_SHIP_DIST_LINE_ID))),
    7 UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.PROJECT_ID))),
    8 UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.ACCOUNT_DISTRIBUTION_CODE))),
    9 UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.ORACLE_ACCOUNT_NUMBER))),
    10 UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.COMPONENT_CODE))),
    11 UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.TRANSACTION_CURRENCY_CODE))),
    12 CGSBI_SHIP_DIST_S_EXTRACT.ORDER_QUANTITY, UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.ORDER_UOM))),
    13 CGSBI_SHIP_DIST_S_EXTRACT.UNIT_PRICE_TRX_CURRENCY,
    14 UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.EXPENSE_TYPE_INDICATOR))),
    15 CGSBI_SHIP_DIST_S_EXTRACT.SOR_ID,
    16 UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.PO_LINE_ITEM_CODE))),
    17 UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.PO_LINE_ITEM_DESC))),
    18 CGSBI_SHIP_DIST_S_EXTRACT.PO_LINE_ITEM_LEAD_TIME,
    19 UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.UNSPSC_CODE))),
    20 UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.BUYER_ID))),
    21 UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.REQUESTOR_ID))),
    22 UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.APPROVER_ID))),
    23 UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.SUPPLIER_SITE_ID))),
    24 UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.SUPPLIER_GSL_NUMBER))),
    25 UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.SHIP_TO_LOCATION_CODE))),
    26 UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.TASK_ID))),
    27 (LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.PO_RELEASE_ID)))
    28 FROM
    29 CGSBI_SHIP_DIST_S_EXTRACT
    30 WHERE PO_NUMBER IS NOT NULL;
    Explained.
    SQL>
    SQL>
    SQL> SELECT * FROM TABLE(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 3891180274
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 77647 | 39M| 2006 (1)| 00:00:25 |
    |* 1 | TABLE ACCESS FULL| CGSBI_SHIP_DIST_S_EXTRACT | 77647 | 39M| 2006 (1)| 00:00:25 |
    Predicate Information (identified by operation id):
    1 - filter("PO_NUMBER" IS NOT NULL)
    13 rows selected.
    SQL>
    SQL>
    Kindly suggest on this...
    Thanks & Regards
    -Naveen Gangil
    Oracle DBA

    Rafi is correct. Since po_number is the filter column, the only chance you have for using an index to access the table is on that column. However, if there are few (or none) rows with null po_number, you will always have FTS. Does the table have a PK ( which probably consists of at least po_number, line_number )? If that is the case po_number could never be null and in which case you are dumping the whole table and no indexing scheme is going to improve the queri's performance. You might, repeat might, see performance improvement if you cleanse the data in the table ( to eliminate the need for UPPER(LTRIM)RTRIM())) ) before querying it so the the data does not have to be massaged before returning it.

  • What kind of view object should I create for this data model?

    I have an entity that has several dates. The dates are stored in a table separate from the entity, each entity date has a date type (open, close, interview, etc) associated with it. The DBAs idea (who else of course!) was to have the flexibility to add new types of dates for entities when needed.
    So you have tables like this -
    Table: EntityTable
    Columns: EntityId, EntityName
    Table: DatesTable
    Columns: EntityId, Date, DateTypeCd
    I need to display an editable ADF form where I can update the entity and the entity dates
    The ADF form would contain something like this -------
    Entity Name: []
    Opening Date: []
    Closing Date: []
    Interview Date: []
    What kind of view object would I need to create to achieve this?

    That would be a master-detail relation 1-* between 'entity' and 'entity dates'. If your dba has set up the foreign key association in the db and you use the wizard to create the business objects, jdev pick up the relation and create the correct master detail relation in the vo layer for you.
    By the way naming a table 'entity' is not a good idea when working with ADFbc. We all talk about entities when we relate to a business object (in this case a row of a table or entity object or EO). So it's hard to distinguish the two, your specific table 'entiyt' and the common term entity or EO which can be a row of any table.
    Timo

  • What class should I extend for this custom control?

    The code below is my attempt at a mxml control to replace a custom context-menu  that my app needs on certain textInput controls.  Characters not on the keyboard are inserted into the text, replacing any selection, if applicable.  Flex AIR apps (which I need for local access to SQLite) don't let me do custom contextmenus when the control is not top-level.
    The custom component is encapsulated now in a Panel but I would like to have the composite control be nothing more than a textInput and a PopUpMenuButton right next to it.  Is that possible—not to have a container?  If so,  what class should I extend, if creating this as an ActionScript component?
    Thanks for the advice.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="228" height="64"  creationComplete="onInit();" >
        <mx:TextInput id="mytextinput"   height="20"></mx:TextInput>   
        <mx:PopUpMenuButton id="mybutton" itemClick="onCharSelected(event);" x="159" y="-2" label="æ" width="41"  />
        <mx:Script>
         <![CDATA[
             import mx.utils.StringUtil;
             import mx.events.MenuEvent;
             import mx.events.ItemClickEvent;
             import mx.controls.TextArea;
            import mx.controls.Alert;
            import flash.events.*;
            import flash.display.Sprite;    
            import mx.collections.ArrayCollection;
                // use a point to track the selection-start and selection-end position for the text field
                private var pt:Point=new Point;
                private var chars:ArrayCollection = new ArrayCollection(
                    [ {label:"ð", data : "ð"},
                      {label:"æ", data:"æ"},
                      {label:"þ", data:"þ"} ]);
                    // track the selection positions as the mouse is moved or text is entered
                  private function onMouseEvent(e:MouseEvent): void{
                      pt.x=this.mytextinput.selectionBeginIndex;
                      pt.y=this.mytextinput.selectionEndIndex;
                  private function trackSelectionIndices(e: Event):void {
                     pt.x=this.mytextinput.selectionBeginIndex;
                      pt.y=this.mytextinput.selectionEndIndex;  
                private function onInit():void {
                    this.mytextinput.addEventListener(Event.CHANGE, trackSelectionIndices);
                    this.mytextinput.addEventListener(MouseEvent.MOUSE_DOWN, onMouseEvent);
                    this.mytextinput.addEventListener(MouseEvent.MOUSE_UP, onMouseEvent);
                    this.mybutton.dataProvider = chars;                     
                private function onCharSelected(e:MenuEvent):void {               
                    doInsert( e.item.data.toString(), this.mytextinput);
            // insert the character chosen from the popup into the text field, replacing any selection, and then reset the insertion point
             private function doInsert(s:String, trgt:Object):void {
                var v:String = TextInput(trgt).text;
                var pre:String =v.substr(0,TextInput(trgt).selectionBeginIndex);
                var post:String=v.substr(TextInput(trgt).selectionEndIndex, v.length-TextInput(trgt).selectionEndIndex);
                var result:String = pre + s + post;
                TextInput(trgt).text=result;
                TextInput(trgt).setSelection(TextInput(trgt).selectionBeginIndex+s.length,TextInput(trgt) .selectionBeginIndex+s.length);
              ]]> 
        </mx:Script>        
    </mx:Panel>

    Wiping perspiration from my brow as I abandon the difficult approach.
    Here is the simpler approach where HBox encapsulates the TextInput and PopUpMenuButton. I am trying to figure out how to let the TextInput keep its selection highlight when it loses focus to the PopupMenuButton: setSelection does not cause the repaint.
    package Search
        import flash.events.*;
        import flash.geom.Point;
        import mx.collections.ArrayCollection;
        import mx.containers.HBox;
        import mx.controls.PopUpMenuButton;
        import mx.controls.TextInput;
        import mx.events.MenuEvent;
        public class UnicodeCharPopupMenu extends HBox
            public function UnicodeCharPopupMenu()        {   
                        super();   
                        Init();
            private var mytextinput:TextInput = new TextInput;
            private var mybutton:PopUpMenuButton = new PopUpMenuButton;
            private function Init():void {
                mytextinput.width=100;
                mytextinput.height=22;
                mybutton.width=44;           
                this.width=200;
                this.height=20;
                visible=true;
               mybutton.addEventListener(FocusEvent.FOCUS_IN, onMenuGotFocus;
                mytextinput.addEventListener(Event.CHANGE, trackSelectionIndices);
                mytextinput.addEventListener(MouseEvent.MOUSE_DOWN, onMouseEvent);
                mytextinput.addEventListener(MouseEvent.MOUSE_UP, onMouseEvent);
                mybutton.addEventListener( MenuEvent.ITEM_CLICK, onCharSelected);
                //mybutton.addEventListener(MenuEvent.MENU_HIDE, onMenuHide);
                //mybutton.addEventListener(MenuEvent.MENU_SHOW, onMenuShow);
                mybutton.dataProvider = chars;  
                addChild(mytextinput);
                addChild(mybutton);           
            // use a point to track the selection-start and selection-end position for the text field
            private var pt:Point=new Point;
              private var chars:ArrayCollection = new ArrayCollection(
                    [ {label:"ð", data : "ð"},
                      {label:"æ", data:"æ"},
                      {label:"þ", data:"þ"} ]);
          //button got focus, repaint selection highlight
            private function onMenuGotFocus(e:FocusEvent): void {           
                 mytextinput.setSelection(pt.x, pt.y);
            // nothing selected, menu closed
            private function onMenuHide(e:MenuEvent): void {
                if (e.item.data==null) {
                    mytextinput.setFocus();
            private function onCharSelected(e:MenuEvent):void {             
                    doInsert( e.item.data.toString(), mytextinput);
           public function getText():String {
                    return mytextinput.text;
                // track the selection positions as the mouse is moved or text is entered
                 private function onMouseEvent(e:MouseEvent): void{
                     pt.x=mytextinput.selectionBeginIndex;
                     pt.y=mytextinput.selectionEndIndex;
                 private function trackSelectionIndices(e: Event):void {
                    pt.x=mytextinput.selectionBeginIndex;
                     pt.y=mytextinput.selectionEndIndex;  
                 private function doInsert(s:String, trgt:Object):void {
                 var v:String = TextInput(trgt).text;
                 var pre:String =v.substr(0,pt.x);
                  var post:String=v.substr(pt.y, v.length-pt.y);
                var result:String = pre + s + post;
                TextInput(trgt).text=result;
                TextInput(trgt).setFocus();
                TextInput(trgt).setSelection(pt.x+s.length,pt.x+s.length);
                pt.x = pt.x + s.length;
                pt.y = pt.x;          

  • Is Flash what I should be using for this simple animation?

    Hi I have a fairly simple question...
    Im working on a project which started with simple drawings of
    a particular animal. One of the drawings ive done involves the
    motion of part of this animal. The next portion of this assignment
    requires me to begin working digitally, and recreating these
    drawings precisely in Autocad.
    The problem is that I need essentially create a storyboard of
    images showing the motion of this animal in detail. So essentially
    im going to need 40+ frames showing this motion. It would be the
    equivalent of creating a flip book animation, but im going to be
    tiling all these frames next to eachother.
    Now as opposed to drawing 40+ separate images I had the idea
    to use Flash to produce these images for me.
    Heres essentially what I want to do:
    - Scan the drawings ive done
    - Reproduce them digitally through Autocad
    - Import these drawings into Flash (either as Autocad files
    or I can convert them to Illustrator files)
    - Basically have two images... 1 at the start of the motion
    and 1 at the end of the motion, and use flash tween's to
    extrapolate the motion in between.
    So ideally I could create 40 frames, with the 1st keyframe
    showing the beginning of the motion, the 40th showing the final
    stage of motion, and each frame in between providing me with the
    separate drawing that I need.
    Any thoughts or advice on how I can go about doing this? I
    havent used Flash in years so im still relatively unskilled with
    it...
    Thanks so much for your help!!

    I agree with Gibbah. Flash doesn't do magic with tweens. Of
    course, you can try. But if you're looking for NATURAL motion, then
    it needs to be drawn naturally-by hand.
    Sure, you can try it in Flash, but at best it will help you
    to tween every 4th drawing or so (so you'll still need 10 key
    drawings), and you'll spend ages tweaking the tweens, since (I
    repeat) Flash doesn't do magic with tweens, nor does any other
    software. You're talking of 4-legged animal movement, which I
    assume includes walking, which is a pretty complicated thing: 4
    legs, each double-jointed, plus the feet, then a body which bends,
    and the head and neck which move up and down. You'll have to
    separate each leg, the body and the head, at the very least, tween
    each of these, then go back and fix where the tweens come out all
    screwy.
    As for scanning, you can scan line artwork (preferably very
    clean lines done with pen or dark pencil) and then vectorize them
    directly in Flash. No need for the Autocad stage.
    To be honest, I think you'll find it faster to do the 40
    drawings individually. Check a good reference book such as the
    famous Eadweard Muybridge (yes, I spelled it correctly) photos of
    animal movements, and then you can rotoscope these (that is, trace
    them). You'll end up with less frustration and a gorgeous animation
    which looks natural, not machine-made. You could do the tracing
    directly in Flash as well, using the onion skin mode to help
    you.

  • What loop should I use for this?

    for (int j=0; j<8; j++) {
                                source.setBackground(EXIT_COLORS[j]);
                                if (j==7)
                                     break;
                                }[/code
    okay, what i'm trying to do here, is display a color object from an array EXIT_COLORS[], which has 8 colors in it. Now I only want to display all of these colors 8 times. right now I can only diplay the last color or the first...I tried double for loops, and it didn't seem to work either...if you have an idea please help                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    sorry about that...I dont' need a break...I'm just trying different things to see if it'll work...
    see, the problem is, that every time my method runs i want one specific color to be displayed on a button, the next time it is ran, i want the next color in the array to be displayed...until the end of the array is reached, then I don't want any more to be displayed...But I can't figure out how to do this...
    here is my method:
         private void updateTiles() {     
                 // Now draw the tiles accordingly
            for (int r=0; r<size; r++) {
                 for (int c=0; c<size; c++) {
                      JButton aButton = view.getFloorTileButton(r*size + c);
                          if ((aButton.isSelected()) && (mode == EDIT_WALL_MODE)){
                               aButton.setBackground(Color.gray);
                      else if((aButton.isSelected()) && (mode == SELECT_EXITS_MODE)){
                          for (int j=0; j<8; j++){
                                aButton.setBackground(EXIT_COLORS[j]);
                       else if(mode == WAIT_MODE)
                           aButton.setBackground(Color.white);
                 // Set the text for the floor tile if it needs to be set
                     // Set the background color for the floor tile
            // Display the path if necessary (in Part C)
         }

  • What t_code should be used for migration?

    Hello there,
    our user wants to  migrate  "output vat" account after being audited.
    actually , they start using SAP from 1st. January.2009 but now needs to migrate for reconciliation purpose.
    Journal should be 40) output VAT   /      50) Beginning Balance-BS.
    Since this output VAT does not need any tax code and base amount, i think normal FI transaction like F-02 is not an answer.
    Furthermore, LSMW is not strongly recommended at this time, considering line item to be created.
    Could you let me know what t_code should be used for this case?
    BR.
    J.
    Edited by: Jimmy Choi on Jun 30, 2009 5:41 PM

    Hi
    Note down the G/L accounts you are posting.
    Option 1 :In OBD4 see the account group. change the tax category mandatory to optional field for running the lsmw. afte completion, set the status as earlier.
    Option 2: goto fs00-> see the field status group.-> double click on the FSG-> see the taxes -> make the fields optional.
    with regards
    siva
    Edited by: Siva Rama Krishna Yanamandra on Jul 2, 2009 1:12 AM

  • Need Help..what should i use for this

    hello friends, i have to write a program which will load an xml file reader class at run time and depending on the content of xml file i'm going to generate mapping.. e.g xml file- <MyMapping> <ATO> <security type=int> </ATO> <FIX> <symbol type=String> </FIX> </MyMapping> Now i want to change the content of xml file without restarting my running application..changes should be reflected at runtime... also my xml file will contain nearly 1000 lines..so in this case which technique should i use whether i use JAXB which will give the classes of my xml file or any other ?? Also if i use JAXB whether JAXB gives classes corrsponding to my xml nodes (e.g ATO.java as per above example).

    daitkarsachin wrote:
    hi ,
    here is my question again..my xml will have
    <Message>
    <ATO>
    <somefiled="X" type=int value=35 />
    </ATO>
    <FIX>
    <somefiled="Y" type=String value=50 />
    <FIX>
    </Message>
    Now first i have to parse this xml ..then my java program is going to accept value from user ..and depending on user specified value i've to use either ATO or FIX fields...e.g if user value is 35 then my program should use fields within ATO node.
    You will read the XML structure into some kind of memory model. When the user supplies a value you will search for a matching value (likely from a collection such as a map or list) and return the value in that object that you locate.
    what should be done for this ..
    See above.
    and what if i change values in my xml file..will i have to restart my application to load xml again ?
    If you change the file on the filesystem, you should simply be able to re-parse the XML file and update your in-memory model. If you instead update your in memory-model, you can serialize the model back to XML on the filesystem. Neither needs to necessarily have anything to do with application start-up (other than the fact that you would normally read in the XML model then, but updating is a separate concern, as would re-reading it).
    - Saish

  • What should be done for this ?

    hi ,
    here is my question ..my xml will have
    <Message>
    <ATO>
    <somefiled="X" type=int value=35 />
    </ATO>
    <FIX>
    <somefiled="Y" type=String value=50 />
    <FIX>
    </Message>
    Now first i have to parse this xml ..then my java program is going to accept value from user ..and depending on user specified value i've to use either ATO or FIX fields...e.g if user value is 35 then my program should use fields within ATO node.
    what should be done for this ..
    and what if i change values in my xml file..will i have to restart my application to load xml again ?

    I have changed your XML to make it well formed. Please refer this further in this reply.
    Well Formed XML:
    <Message>
         <ATO somefiled="X" type="int" value="35"/>
         <FIX somefiled="Y" type="String" value="50"/>
    </Message>
    daitkarsachin wrote:Now first i have to parse this xml ..then my java program is going to accept value from user ..and depending on user specified value i've to use either ATO or FIX fields...e.g if user value is 35 then my program should use fields within ATO node.
    what should be done for this ..A simple XPath Query can do trick for you, it can give you ATO or FIX element according to user specified value. XPath query can be:
    // replace ##user_specified_value## with value user enters.
    String xPathquery= "/Message/child::*[@value='##user_specified_value##']";
    daitkarsachin wrote:and what if i change values in my xml file..will i have to restart my application to load xml again ?Not necessary to restart application but you need to parse or reload updated XML file again.

  • Recently purchased an iphone 6 and got it as a defected(a cut on flex cable of sleep and wake button. What should i do in this cas..??

    Company refuses to give warantee as they declare thi defect as external modification..,
    WHat should i do in this case..!!

    Return it to the seller for a refund. Opening the iPhone - whether you did it or
    previous owner opened it - voided the warranty and also made the iPhone
    ineligible for an Out of Warranty reduced price replacement.

  • I can't install any software,it said iOS 4.3,iOS 5, etc required.what should I do for this iOS....????

    I can't install any software,it said iOS 4.3,iOS 5, etc required.what should I do for this iOS....????

    Connect it to iTunes on a computer and check for updates.
    (74556)

  • My iMessages and FaceTime are offline.. When I try to activate my apple id account.. it says The server encountered an error processing registration. Please try again later. What should I do in this case?

    My iMessages and FaceTime are offline.. When I try to activate my apple id account.. it says The server encountered an error processing registration. Please try again later. What should I do in this case?

    Hey radyslav,
    There's an article that applies to your situation, I'd follow the steps within here:
    FaceTime, Game Center, Messages: Troubleshooting sign in issues
    http://support.apple.com/kb/TS3970
    Take care,
    Delgadoh

  • What query should I use to find all versions of Office 2013 64-bit installed on client computers?

    What query should I use to find all versions of Office 2013 64-bit installed on client computers? Could someone create a custom query? I need all of the client computers names and which ones have any Office 64-bit components. Thank you so much! I really
    appreciate it!

    Hi,
    You could edit the following query to meet your requirement.
    SELECT     dbo.v_R_System.Name0, dbo.v_GS_OPERATING_SYSTEM.Caption0 AS [Operating System],
                          dbo.v_GS_OPERATING_SYSTEM.CSDVersion0 AS [OS Service Pack], arp.DisplayName0,
                          CASE WHEN arp.version0 LIKE '11.0.6361.0' THEN 'SP1' WHEN arp.version0 LIKE '11.0.7969.0' THEN 'SP2' WHEN arp.version0 LIKE '11.0.8173.0'
    THEN 'SP3' WHEN
                           arp.version0 LIKE '12.0.6215.1000' THEN 'SP1' WHEN arp.version0 LIKE '12.0.6425.1000' THEN 'SP2' WHEN arp.version0 LIKE '14.0.6029.1000'
    THEN 'SP1' ELSE '' END
                           AS 'Service Pack', arp.Version0
    FROM         dbo.v_Add_Remove_Programs AS arp INNER JOIN
                          dbo.v_R_System ON arp.ResourceID = dbo.v_R_System.ResourceID INNER JOIN
                          dbo.v_RA_System_SMSInstalledSites AS ASSG ON dbo.v_R_System.ResourceID = ASSG.ResourceID INNER JOIN
                          dbo.v_GS_OPERATING_SYSTEM ON dbo.v_R_System.ResourceID = dbo.v_GS_OPERATING_SYSTEM.ResourceID
    WHERE     (arp.DisplayName0 LIKE '%Microsoft Office%edition%' OR
                          arp.DisplayName0 LIKE '%Microsoft Office Standard 2007%' OR
                          arp.DisplayName0 LIKE '%Microsoft Office Enterprise 2007%' OR
                          arp.DisplayName0 LIKE '%Microsoft Office Professional%2007%' OR
                          arp.DisplayName0 LIKE '%Microsoft Office Standard 2010%' OR
                          arp.DisplayName0 LIKE '%Microsoft Office Enterprise 2010%' OR
                          arp.DisplayName0 LIKE '%Microsoft Office Professional%2010%' OR
                          arp.DisplayName0 LIKE 'Microsoft Office 2000%' OR
                          arp.DisplayName0 LIKE 'Microsoft Office XP%') AND (arp.DisplayName0 NOT LIKE '%update%') AND
                          (arp.DisplayName0 NOT LIKE '%Microsoft Office XP Web Components') AND (dbo.v_R_System.Operating_System_Name_and0 NOT LIKE '%server%')
    AND
                          (arp.InstallDate0 NOT LIKE 'NULL')
    ORDER BY dbo.v_R_System.Name0, arp.DisplayName0, arp.Version0
    Full details:http://social.technet.microsoft.com/Forums/systemcenter/en-US/7baeb348-fb63-4115-8d76-2c884d18f708/sql-query-to-check-ms-office-service-pack-level?forum=configmgrreporting
    Best Regards,
    Joyce
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • My requirement is to update 3 valuesets daily based on data coming to my staging table. What is the API used for this and how to map any API to our staging table? I am totally new to oracle and apps. Please help. Thanks!

    My requirement is to update 3 valuesets daily based on data coming to my staging table. What is the API used for this and how to map any API to our staging table? I am totally new to oracle and apps. Please help. Thanks!

    Hi,
    You could use FND_FLEX_LOADER_APIS.UP_VALUE_SET_VALUE to upload them from staging table (I suppose you mean value set values...).
    You can find a sample scripts if you google around.
    What do you mean "how to map any API to our staging table" ?
    You should do at least the following mapping (which column(s) in the staging table will provide these information):
    - the 3 value sets name which you're going to update/upload (I suppose these are existing value sets or which have been already created)
    - the value set values and  description
    Try to start with something and if there is any issues the community could then help... but for the time being with the description of the problem you have provided, that's the best I can do...

  • How many tempdb mdb files will be created in this case?

    How many tempdb mdb files will be created in this case?
    SQL Server detected 2 sockets with 6 cores per socket and 12 logical processors per socket, 24 total logical processors; using 24 logical processors based on SQL Server licensing. This is an informational message; no user action is required.
    I have sql server 2012 enterprise edition 64 bit
    Thanks

    Its all upto your server usage and number of processors,
    Note : If the number of logical processors is greater than 8, use 8 data files and then if contention continues, increase the number of data files by multiples of 4 (up to the number of logical processors) until the contention is reduced
    to acceptable levels or make changes to the workload/code.
    For optimal performance, you could add data files of the same size to tempdb up
    to the # of processors on your server. So a 4 processor server should have 4
    same-sized physical files for tempdb for optimal tempdb performance. The reason
    you want the files to be the same size is because SQL Server tries to keep the
    files filled to the same proportion. So if you had a 100MB file and a 200MB
    file, SQL Server will try to keep them at the same fill level, for example 50%,
    which means that the 200MB file will be written to approximately twice as much
    as the 100MB file which reduces the performance gained by having multiply
    files.
    Please read this below links just for your reference.
    http://support.microsoft.com/kb/2154845/en-us
    http://blogs.msdn.com/b/sqlserverstorageengine/archive/2009/01/04/managing-tempdb-in-sql-server-tempdb-configuration.aspx
    http://www.sqlskills.com/blogs/paul/a-sql-server-dba-myth-a-day-1230-tempdb-should-always-have-one-data-file-per-processor-core/
    Raju Rasagounder MSSQL DBA

Maybe you are looking for

  • OBIEE 11G DASHBOARD CREATION DIFFICULTIES

    i HAVE BEEN TRYING TO SAVE MY ANALYSIS ON A SHARED FOLDER SO THAT I COULD PULL IT OUT TO CREATE ADDITIONAL DASHBOARD PAGES BUT THIS MESSAGE KEEPS POPING UP: CANT SAVE IN ROOT FOLDER. THIS MADE IT DIFFICULT FOR ME TO ADD CONTENT TO A NEW DASHBOARD PAG

  • Urgent Help!!!! #Multivalue error

    Hi Experts, I am facing #multivalue error in my BO webi report formula. Formula is : = ((Max([AR open items as on date]) * (Max([No. of days Considered] In Report)))/(Max ([Credit sales for the period] In Report))). I am using Webi 4.1. thin client.

  • Load Balancing Two Servers

    i have two Solaris servers running 9iAS R2 OC4j. current patch level is 9.0.2.3 i'm trying to load balance the instances according to the instructions in this document: Oracle9i Application Server: mod_oc4j Technical Overview all i should need to do

  • PEARL 8130, locking up, memory leak, no camera, 3rd phone its happened too.

    Just thought I'd say very unhappy with this phone as I will be on my fourth within six months, from memory leakage, to camera not working, to freezing up consistantly, and the screen blanking out and going all white.  Also the camera runs when it wan

  • 1 Profit Center to Many Company Codes

    Hi, Currently we have 1 Company Code pointing to multiple Profit Centers. We are trying to re-organize the structure to have 1 Profit Center pointing to multiple company codes. Need input to analyze what areas or processes (standard) would be affecte