Change the attribute kind programatically

Hi All,
I am using ADF BC, Jdeveloper Studio Edition Version 11.1.1.6.0, Oracle 10g database.
I have 2 databases, and the same application should support both of them. in the first database, one table has an extra column, whereas the second one does not have that column.
In my entity object I can specify if that column is exist or not base on database function, by my question is  can I set the attribute kind (either persistent or transient)   for this attribute programatically?
I found a getAttributeKind method in AttributeDefImpl class which return the  "kind" enumerations of this attribute. The "kind" of enumeration can be either persistent, derived, row-associated, transient, or dynamic.
AttributeDefImpl (Oracle Fusion Middleware Java API Reference for Oracle ADF Model)
but I did not find any setter method for this property.

Hi Mohammad,
If you dont find the solution via programmatically maybe you could use a ternary operator in the query of your VO something like
select
(case when yourFuntionToCheck() then AttributeName else null end) result from dual
I dont know if this could work but maybe you will always get the column 'result' and will come empty if the attribute doesn't exists. If that works, then you could put a meaningful value for you to know that the result attribute doesn't exists so you don't have problems while comiting to data base etc.
Hope this helps

Similar Messages

  • How to change the attribute name for a relation

    When the Data Modeler engineers a logical model into a relational model it create table columns for the relations. The names of the generated columns are listed in the attributes list in the properties dialog of the relation. The actual name of the attribute gets calculated by the attribute name of the entity which is part of the relation. This is okay, if there is only one relation between two entities. But when there are two relations between two entities the second attribute gets a stupid number suffix. This makes it impossible to give the attribute a useful semantic meaning.
    When I engineer the model into a relational model I can change the column name in the relational model. Changing the column name in the relational model is not perfect but it would be okay for me, if it would not be overwritten during the next engineering run.
    So I have two questions:
    How can I change the attribute name in the attributes section of the properties dialog of a relation? See here for screen shot:
    http://public.ceving.de/2012050300/relationattribute.png
    And if it is not possible:
    How can I preserve any changes on column names in the relational model during a re-engineering run?
    Edited by: 931739 on 03.05.2012 08:07

    Hi,
    I've logged an Enhancement request on this.
    I don't believe it's possible to change it from the Entity or Relationship dialog, as it's not updatable in these dialogs.
    What you can do is change it in the Relational Model, and then reverse engineer the change back to the Logical Model.
    David

  • When I change the media kind to audio book it wont stay using itunes 10.6.0.40

    When I change the media kind to audio book it wont stay using itunes 10.6.0.40
    I did formate my computer and then reinstilled itunes on a drive that had it on it.
    I'm useing 5.01 not the new 5.1
    Ideas?
    Thanks!

    Still no ansers?
    any one?
    IS it just that i tunes is fail?

  • How to change the attribut of Form in Review Form in ISR

    Hi,
    We have to change the attributes of text fields of form ( e.g disabling the text field ) once user hits the Review Form button on MSS page
    Please let me know how to do it .
    Thanks
    Manish

    Hi Manish,
    You may write the Formcalc scripting for the respective field.
    //Check ISR control parameters for read/write access
    if($record.CONTROL_PARAM.ISR_MODE == "DISPLAY" |
       $record.CONTROL_PARAM.ISR_FORM_VIEW =="ISR_APPROVE" | <b>$record.CONTROL_PARAM.ISR_REVIEW == "true" )</b>
    then
         this.access = "readOnly"
    else
         this.access = ""
    endif
    Hope this helps.
    Thanks and Regards,
    Anto.

  • How to change the attributes of GUI CONTROLS in my own program.

    hi all,
    i just want to change the attributes of GUI CONTROLS in my own program.
    for example `
    How to set an ICON on my GUI BUTTON in the program?
    so what's the mapping between CONTROL in the SCREEN PAINTER and variable in the program?

    Hi Chao Liu,
    Ya , u first find out the PF-STATUS of the screen and goto that status and now u can modify the ICON u want .
    Finding the GUI status of the screen
    Goto that  TRANSACTION CODE or SCREEN
    On the Standard Menu bar Goto ( Menu path) System --> Status
    Now u get a pop-up System :status in that in SAP Data block u can find GUI Status. Now Double Click on that Status. It takes u to the Status of that screen.
    Now click on the Display --> Change Button on the application tool bar.
    If it is a standard GUI-status then it asks for the ACCESS KEY.
    if it is a custom defined GUI Status  then u can change the status .
    reward if helpful
    raam

  • How to change the  attribute of screen field to drop down list dynamically

    Hi All,
      Col X                   Col Y
      A                        input field
      B                       drop down list
    This is a tabular disply where the Screen field attribute for Col y  is NO DROP DOWN BOX.
    My requirement is to change the attribute of COl Y to DROP DOWN list depending on the value of
      COL X  dynamically.

    Dear Ajay,
    Actually this requirement is to enhance the standard screen for Tcode :EHSVU21.
    So depending on the 1st Column(Test no)  value ,i have to change the 3rd Column(Low.norm.result)
    property either to DROP Down or not.
    So in the PBO only the changes to be made and there is no field in SCREEN internal table for changing the attribute to DROP down. I checked SCREEN internal table where the field VALUE_HELP and REQUEST is useful but not  suitable for my case.
    Any solution available?

  • How to change the attributes of screen fields dynamically

    <b></b>
    well i have created a table by name empmaster_data with following fields.
    *emp_id.
    *emp_fname.
    *emp_lname
    *dob.
    *doj.
    *dept.
    *desig.
    now using a single screen i want to create,change and display the information.even i am using save and exit button.
    now i want to change the attributes of screen fields dynamically like active,input,output,invisible.

    Hi,
    Have Different Radio Buttons for the purposes what you have and use AT Selection Screen Output, Under the event Use loop at screen and with continue with your requirement.
    Hope This Info Helps YOU.
    <i>Reward Points If It Helps YOU.</i>
    Regards,
    Raghav

  • Changing the file kind's description

    On my MacBook Pro running Leopard, I have several PHP files whose kind in Finder is displayed as "HTML Document". When I display the "Get Info" pop-up for a PHP file, the Kind field under General is not editable.
    I would like to change the file's kind description from "HTML Document" to "PHP Source File". I have done a lot of digging and searching via Google to find a solution to this and I have not found anything that describes how to do this.
    Is there a way under OS X to change the file kind description?

    Hello jk:
    I do not use those files, but I suggest you do a Google search on "PHP." There is a lot of information there.
    Barry

  • In iTunes I'm having problems changing the "Media Kind" with a number of playlists in the OPTIONS menu from "music" to "audiobook". After going through the steps, the next time I check the items have reverted back to "music". What step am I missing?

    In iTunes I'm having problems changing the "Media Kind" in the OPTIONS menu from "Music" to "Audiobook". After going through the steps, the next time I check, the items have reverted back to "Music". What must I do to save it as an "Audiobook"?

    After more digging in the Support section here and some Google work, I turned off iTunes Match and lo and behold!  I can change the media kind to Audiobook!  So, it looks like iTunes Match locked the files up somehow and for some reason.
    I went into iTunes Store > iTunes Match > "No, Thanks" to disable it on the local PC.

  • Is it possible to change the file Kind, e.g. mkv to video and not document?

    Is it possible to change the file Kind, e.g. mkv to video and not document?
    I can't find where I can change this in Finder or OSX.  Is this really hardoded in the OS?  Get Info gives me no options, but that is where I set the default apps for file kinds (types).
    I hope this is possible because I have lot of document kinds and the arrange by kind view in Finder is thus not very useful.
    Thanks in advance.

    It has to be hard-coded in the application that claims MKV files as a type.

  • Change the attribute "src" to "href" before importing an XML

    I need to change the attribute "src" to "href" (<img scr="....">) before importing an XML document. I think you could do with XSLT, so you can add a script to import XML documents. But I do not know much about XSLT ...
    Does anyone could give me an idea?
    Thanks in advance...!!!

    Piece of cake. Here is an identity transform, except that it filters out "src" attributes:
    <?xml version="1.0" ?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" >
    <xsl:template match="node()|@*">
      <xsl:copy>
        <xsl:apply-templates select="node()|@*"/>
      </xsl:copy>
    </xsl:template>
    <xsl:template match="@src">
      <xsl:attribute name="href">
          <xsl:value-of select="."/>
       </xsl:attribute>
    </xsl:template>
    </xsl:stylesheet>
    See http://stackoverflow.com/questions/2679443/how-do-i-rename-an-attribute-using-xslt

  • Changing the media kind.

    I can't change the media kind of a digital booklet to make it a book so I can sync it. And I don't have iTunes Match .

    "Podcast" is not a file format or anything, it's simply how it was downloaded, such as by being listed in an RSS feed. That's why a PDF file can be a podcast. If you simply download (or create) an mp3 file, and add it to the iTunes Library, it still doesn't have any association with a podcast feed. I think to change it you need to hack one or more of the the user-unfriendly xml files in the iTunes folder. Not something I really want to mess with, unless it's just after a full backup.
    Try this AppleScript "Re-Add Selected Tracks as Podcast v1.2" - from http://dougscripts.com/itunes/scripts/scripts07.php?page=1

  • How to Set / change the attribute of Business Object

    Hi all,
    Say I have a Z Business Object -> ZBO
    Inside the BO, I have an attribute -> ZA1
    And one method -> ZM1
    Is there any way in which  i can set / update the attribute ZA1 (for any particular instance) outside the Business Object (I mean without writing any code in the program of the Business object)?
    Thanks,
    Deb

    >
    Debidutta Mohanty wrote:
    > But Inside the class -> Can be assigned or changed -> Using Method -> Correct ?
    >
    > That means, inside the Business Object aslo, we can have one method to assign or change attribute. Is there any Macro to change the attribute ?
    Yes.
    BOR attribuites are a piece of code. You can see this by hilighting an attribute and clicking on the "Program" button. That code returns the attribute value, usually something from a DB table, something calculated, or a private attribute.
    To change what the attribute returns, you need to change the underlying data. How you do it depends on what your attribute code does in first place. This is why we can't give you an exact answer. If your attribute retrieves a value from a table entry then you need to change the table entry. If it is a calculated value then you need to change the data used in the calculation to make your attribute return something else. If it returns a private attribute value then you need to update this via a method.

  • How to change the attributes of an XML file

    hi peeps 'ope you can help me here i need to change the attributes of an xml file, i parse it first using a DOM parser but i cant find a way to change the attributes in the XML file, setAttribute() works only at runtime and doesn't change the attribute in the file itself. I can't find a method that will answer my question. I've searched through the forum and found similar threads....they say in order to write and change the attribute i must use the write() method of the XmlDocument class defined in com.sun.xml.tree.XmlDocument. But, i found another thread, and it says that com.sun.xml.tree.XmlDocument is not safe to use and i should use org.apache.crimson.tree.XmlDocument.....i can't find the XmlDocument class and the API for this package so i really dont know where to start...hope you guys can help me! thnx

    thanks for responding roland....i already found the solution...i didn't use the XmlDocument class because i can't find any documents about it except for JAXP 1.0 here is my code snippet...i used the TransformerFactory and Transformer class to write
    import org.w3c.dom.*;
    import org.w3c.dom.traversal.*;
    import javax.xml.parsers.*;
    import javax.xml.transform.*;
    import javax.xml.transform.dom.*;
    import javax.xml.transform.stream.*;
    Document doc = null;
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    DocumentBuilder db = dbf.newDocumentBuilder();
    dbf.setValidating(false);
    doc = db.parse(fileGetFile); //this is the XML file
    n1 = (Node)doc.getDocumentElement();
    e1 = (Element) n1;
    NodeList nodeList = doc.getElementsByTagName ("File");
    //just insert whatever you want to do with the XML...parse it..set/change the attribute..etc....sample snippet below changes the attribute downloaded to "no"
    for(int iWriteFailed = 0; iWriteFailed <nodeList.getLength() ; iWriteFailed ++){     
    n2 = nodeList.item(iWriteFailed);
    e2 = (Element) n2;          
    e2.setAttribute("downloaded", "no");}
    try{
    TransformerFactory transformerFactory = TransformerFactory.newInstance();
    Transformer transformer = transformerFactory.newTransformer();
    transformer.transform(new DOMSource(doc), new StreamResult ( new FileOutputStream ( fileGetFile) ) );}
    catch(Exception trans){}
    thanks for responding and keeping the information interchange alive here in the forum...
    Pau

  • HT201306 I can not change the "media kind" because it's greyed out.  How do I get past this problem?

    I can't change the "media kind" to book from music because this option is greyed out.  How can I change this so I can view the digital booklet that should have come with my "delux" purchase?

    Does this happen with all media in iTunes or just that one specific track?
    If it happens with everything, try following along with turingtest2's fix in this thread -> Information boxes grayed out
    The Music folder that those files are stored in might be locked or your user account may not have complete access.
    If it only happens with one track, try importing it into iTunes again or redownloading it.

Maybe you are looking for

  • AJAX Feature request

    Hi! Im am just begining with HTMLDB. I love the productivity boost compared to other languages. I am just posting to ask for a feature. I've seen impressive AJAX demos out there, and I wonder if HTMLDB will implement some AJAX facilities. Precisely,

  • Save as locations in adobe affected by Bridge?

    To start, I don't know if this is a Bridge question at all, but let me describe the symptoms and then maybe someone can show me where better to look. Mac G5 desktop dual, OS 10.4.11 Just very recently my adobe software (AI, Indd, PS CS4) has lost it'

  • E-TDS quarterly return procedure

    Hi, Kindly guide me E-TDS quarterly return including Form 26Q and Form 27Q procedure including any configuration. Regards, Samrat Edited by: Samrat Roy on Jun 22, 2009 1:13 PM

  • StorageDir in Application.xml

    We store all of our flv files on a network storage device. I've setup a VirtualDirectory in vhosts.xml that maps a virtual path to the network drive. I have noted the StorageDir in application.xml and tried changing this to the network drive. It was

  • Consignment process for BOM

    Dear All, Kindly guide me on the above scenario What are the steps invoolved in configuration for BOM material. Please tell me what should be the Item category and schedule line category if it is BOM material. I need the same for Consignment fill up,