Collection of objects

If you needed to hold a collection of objects with a class, how would you do it ?
Thanks in advance,
KK

If I had not misinterpreted the Class also extends Object.
So any collection will work for you.
Check Out !
Ashish

Similar Messages

  • How to create an collection/array/object/thingy from a bunch of objects for eventual export to CSV.

    This is a follow-up to an earlier post (How
    to output a bunch of variables into a table.) Now that I can ouput data for a single computer I need to to do the same for a list of computers into a CSV. In more general terms how do I get a bunch of $Computer objects into a single collection/array/object/thingy
    with a clever name like $Computers?
    # http://ss64.com/ps/get-wmiobject-win32.html
    # http://social.technet.microsoft.com/Forums/en-US/da54b6ab-6941-4e45-8697-1d3236ba2154/powershell-number-of-cpu-sockets-wmi-query?forum=winserverpowershell
    # http://serverfault.com/questions/10328/determine-cpu-processors-vs-sockets-though-wmi
    # http://social.technet.microsoft.com/Forums/windowsserver/en-US/8443fcfd-5a0b-4c3d-bda7-26df83d2ee92/how-to-output-a-bunch-of-variables-into-a-table?forum=winserverpowershell
    Param(
    [Parameter(Mandatory=$false,ValueFromPipeline=$true)]
    [string]$ComputerName = $env:COMPUTERNAME,
    [Parameter(Mandatory=$false,ValueFromPipeline=$false)]
    [ValidateScript(
    If ( $_ -ne $null ) { Test-Path $_ }
    [String]$ComputerListFile
    Function Get-Computer
    Param(
    [string]$ComputerName
    $Win32_PingStatus = $null
    $Win32_PingStatus_Result = $null
    $Win32_OperatingSystem = $null
    $Win32_Processor = $null
    $Win32_PhysicalMemory = $null
    $Win32_ComputerSystem = $null
    $Win32_BIOS = $null
    $Computer = $null
    $Win32_PingStatus = "select * from Win32_PingStatus where address = '$ComputerName'"
    $Win32_PingStatus_Result = Get-WmiObject -query $Win32_PingStatus
    If ( $Win32_PingStatus_Result.protocoladdress )
    "$ComputerName ping succeeded."
    $Win32_OperatingSystem = Get-WmiObject Win32_OperatingSystem -computer $ComputerName -ErrorAction SilentlyContinue
    If ( $Win32_OperatingSystem -eq $null)
    "$ComputerName WMI failed."
    } Else {
    "$ComputerName WMI succeeded."
    $Win32_Processor = [object[]]$(Get-WmiObject Win32_Processor -computer $ComputerName)
    $Win32_PhysicalMemory = [object[]]$(Get-WmiObject Win32_PhysicalMemory -computer $ComputerName)
    $Win32_ComputerSystem = Get-WmiObject Win32_ComputerSystem -computer $ComputerName
    $Win32_BIOS = Get-WmiObject Win32_BIOS -computer $ComputerName
    $Computer = New-Object -Type PSObject -Property @{
    Name = $Win32_OperatingSystem.CSName
    Win32_BIOS_SerialNumber = [string]$Win32_BIOS.SerialNumber
    Win32_ComputerSystem_Manufacturer = [string]$Win32_ComputerSystem.Manufacturer
    Win32_ComputerSystem_Model = [string]$Win32_ComputerSystem.Model
    #Win32_ComputerSystem_NumberOfLogicalProcessors = [int32]$Win32_ComputerSystem.NumberOfLogicalProcessors
    #Win32_ComputerSystem_NumberOfProcessors = [int32]$Win32_ComputerSystem.NumberOfProcessors
    Win32_ComputerSystem_TotalPhysicalMemory = [long]$Win32_ComputerSystem.TotalPhysicalMemory
    Win32_ComputerSystem_TotalPhysicalMemory_GB = [float]($Win32_ComputerSystem.TotalPhysicalMemory / (1024*1024*1024))
    Win32_OperatingSystem_Caption = [string]$Win32_OperatingSystem.Caption
    Win32_OperatingSystem_CSName = [string]$Win32_OperatingSystem.CSName
    #Win32_OperatingSystem_OSArchitecture = [string]$Win32_OperatingSystem.OSArchitecture
    #Win32_OperatingSystem_SerialNumber = [string]$Win32_OperatingSystem.SerialNumber
    Win32_OperatingSystem_ServicePackVersion = [string]$Win32_OperatingSystem.ServicePackMajorVersion + "." + [string]$Win32_OperatingSystem.ServicePackMinorVersion
    Win32_PhysicalMemory_Capacity = ($Win32_PhysicalMemory | ForEach-Object { $_.Capacity } | Measure-Object -Sum).sum
    Win32_PhysicalMemory_Capacity_GB = (($Win32_PhysicalMemory | ForEach-Object { $_.Capacity } | Measure-Object -Sum).sum / (1024*1024*1024))
    Win32_Processor_Count = [int]$Win32_Processor.Count
    Win32_Processor_NumberOfCores = [string]$Win32_Processor[0].NumberOfCores
    Win32_Processor_NumberOfLogicalProcessors = [string]$Win32_Processor[0].NumberOfLogicalProcessors
    #Win32_Processor_Description = [string]$Win32_Processor[0].Description
    Win32_Processor_Manufacturer = [string]$Win32_Processor[0].Manufacturer
    Win32_Processor_Name = [string]$Win32_Processor[0].Name
    } ## end new-object
    $Computer
    } Else {
    "$ComputerName ping failed."
    $ComputerNameMgmt = $ComputerName + "-mgmt"
    $Win32_PingStatus = "select * from Win32_PingStatus where address = '$ComputerNameMgmt'"
    $Win32_PingStatus_Result = Get-WmiObject -query $Win32_PingStatus
    If ( $Win32_PingStatus_Result.protocoladdress )
    "$ComputerNameMgmt ping succeded."
    } Else {
    "$ComputerNameMgmt ping failed."
    "$(Get-Date -Format o) Starting script $($MyInvocation.MyCommand.Name)"
    If ( $ComputerListFile -eq $null -or $ComputerListFile.Length -eq 0 )
    "Processing computer $ComputerName"
    Get-Computer( $ComputerName )
    } Else {
    "Processing computer list $ComputerList"
    $ComputerList = Get-Content $ComputerListFile
    $Computers = @{}
    $Results = @()
    ForEach( $ComputerListMember in $ComputerList )
    "$(Get-Date -Format o) $ComputerListMember"
    # Get-Computer( $ComputerListMember ) | Add-Member -InputObject $Computers -MemberType NoteProperty -Name $_
    # http://social.technet.microsoft.com/Forums/windowsserver/en-US/e7d602a9-a808-4bbc-b6d6-dc78079aafc9/powershell-to-ping-computers
    # $Compuers += New-Object PSObject -Property $Props
    # $Computers += New-Object PSObject -Property Get-Computer( $ComputerListMember )
    Get-Computer( $ComputerListMember )
    "$(Get-Date -Format o) Ending script $($MyInvocation.MyCommand.Name)"
    If I try something like this:
    Get-Computer( $ComputerListMember ) | Add-Member -InputObject $Computers -MemberType NoteProperty -Name $_
    I get the following, even though $_.Name is not null.
    Add-Member : Cannot bind argument to parameter 'Name' because it is null.
    At <path to my script>Get-Hardware_Memory_OSVersion_CPU_Cores_ver04_sanitized.ps1:111 char:107
    + Get-Computer( $ComputerListMember ) | Add-Member -InputObject $Computers -MemberType NoteProperty -Name <<<< $_
    + CategoryInfo : InvalidData: (:) [Add-Member], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.AddMemberCommand
    Or if I try this:
    $Computers += New-Object PSObject -Property Get-Computer( $ComputerListMember )
    I get this:
    New-Object : Cannot bind parameter 'Property'. Cannot convert the "Get-Computer" value of type "System.String" to type "System.Collections.Hashtable".
    At <path to my script>Get-Hardware_Memory_OSVersion_CPU_Cores_ver04_sanitized.ps1:114 char:47
    + $Computers += New-Object PSObject -Property <<<< Get-Computer( $ComputerListMember )
    + CategoryInfo : InvalidArgument: (:) [New-Object], ParameterBindingException
    + FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerShell.Commands.NewObjectCommand

    Hi Aenagy,
    If you want to combine all the computers' information to a single array, and add the property computername in the output, please also try the script below, which I make a little modification of the function Get-Computer, pleaese make sure the account running
    the script has the admin permission of the remote computers, or you need to privide cridentials in get-wmiobject, also note I haven't tested:
    $output = @()#to output information of the all the computers
    ForEach( $ComputerName in $ComputerList ){#loop all the computers
    $Win32_PingStatus = "select * from Win32_PingStatus where address = '$ComputerName'"
    $Win32_PingStatus_Result = Get-WmiObject -query $Win32_PingStatus
    If ( $Win32_PingStatus_Result.protocoladdress )
    "$ComputerName ping succeeded."
    $Win32_OperatingSystem = Get-WmiObject Win32_OperatingSystem -computer $ComputerName -ErrorAction SilentlyContinue
    If ( $Win32_OperatingSystem -eq $null)
    "$ComputerName WMI failed."
    Else {
    "$ComputerName WMI succeeded."
    $Win32_Processor = [object[]]$(Get-WmiObject Win32_Processor -computer $ComputerName)
    $Win32_PhysicalMemory = [object[]]$(Get-WmiObject Win32_PhysicalMemory -computer $ComputerName)
    $Win32_ComputerSystem = Get-WmiObject Win32_ComputerSystem -computer $ComputerName
    $Win32_BIOS = Get-WmiObject Win32_BIOS -computer $ComputerName
    $Computer = New-Object -Type PSObject -Property @{
    Computername = $ComputerName #add the property computername
    Name = $Win32_OperatingSystem.CSName
    Win32_BIOS_SerialNumber = [string]$Win32_BIOS.SerialNumber
    Win32_ComputerSystem_Manufacturer = [string]$Win32_ComputerSystem.Manufacturer
    Win32_ComputerSystem_Model = [string]$Win32_ComputerSystem.Model
    #Win32_ComputerSystem_NumberOfLogicalProcessors = [int32]$Win32_ComputerSystem.NumberOfLogicalProcessors
    #Win32_ComputerSystem_NumberOfProcessors = [int32]$Win32_ComputerSystem.NumberOfProcessors
    Win32_ComputerSystem_TotalPhysicalMemory = [long]$Win32_ComputerSystem.TotalPhysicalMemory
    Win32_ComputerSystem_TotalPhysicalMemory_GB = [float]($Win32_ComputerSystem.TotalPhysicalMemory / (1024*1024*1024))
    Win32_OperatingSystem_Caption = [string]$Win32_OperatingSystem.Caption
    Win32_OperatingSystem_CSName = [string]$Win32_OperatingSystem.CSName
    #Win32_OperatingSystem_OSArchitecture = [string]$Win32_OperatingSystem.OSArchitecture
    #Win32_OperatingSystem_SerialNumber = [string]$Win32_OperatingSystem.SerialNumber
    Win32_OperatingSystem_ServicePackVersion = [string]$Win32_OperatingSystem.ServicePackMajorVersion + "." + [string]$Win32_OperatingSystem.ServicePackMinorVersion
    Win32_PhysicalMemory_Capacity = ($Win32_PhysicalMemory | ForEach-Object { $_.Capacity } | Measure-Object -Sum).sum
    Win32_PhysicalMemory_Capacity_GB = (($Win32_PhysicalMemory | ForEach-Object { $_.Capacity } | Measure-Object -Sum).sum / (1024*1024*1024))
    Win32_Processor_Count = [int]$Win32_Processor.Count
    Win32_Processor_NumberOfCores = [string]$Win32_Processor[0].NumberOfCores
    Win32_Processor_NumberOfLogicalProcessors = [string]$Win32_Processor[0].NumberOfLogicalProcessors
    #Win32_Processor_Description = [string]$Win32_Processor[0].Description
    Win32_Processor_Manufacturer = [string]$Win32_Processor[0].Manufacturer
    Win32_Processor_Name = [string]$Win32_Processor[0].Name
    } ## end new-object
    $output+=$Computer #combine all the "$computer" to "$output"
    Else {
    "$ComputerName ping failed."
    $output
    If you have any feedback on our support, please click here.
    Best Regards,
    Anna
    TechNet Community Support

  • Client code cast error:EJB returning data in Collection of Objects

    Still trying to understand this EJB stuff.....
    My BMP EJB returns data to the client in a collection of objects;
      // Home interface (CountryHome) nothing unusual here
      public Collection findAllCountries()
      //Remote interface (Country) nothing unusual here
      public CountryModel getDetails()The data object is a serialised object;
      // data object - nothing strange here
      public class CountryModel implements Serializable {
        private int countryId;
        private String countryName;
        public CountryModel () {......etc etc
        public CountryModel getDetails()  {.......etc etc
        public String toString() { ...etcWhen I try and get at the data from the collection in the client code, calling getDetails() in CountryModel causes a cast exception. How can I get at the data?
      Collection a = home.findAllCountries();
      Iterator i = a.iterator();
      while (i.hasNext()) {
        Object obj = i.next();
        Country country = (Country)
             PortableRemoteObject.narrow(obj, Country.class);
        // this fails with class cast exception.....
        System.out.println(country.getDetails());And to add to the confusion, why does calling the remote interface's getPrimaryKey() method in the client code invoke the toString() method in the CountryModel class and work?
      while (i.hasNext()) {
        Object obj = i.next();
        Country country = (Country)
             PortableRemoteObject.narrow(obj, Country.class);
        // have no idea why this works.....but it does.....
        System.out.println(country.getPrimaryKey());Thanks, lebo

    hi,
    you are getting a collection of serializable objects and not remote objects. the narow method has to be applied only for remote objects (actually it is the stub that will be received on the client side).
    so you modify your code as,
    Collection a = home.findAllCountries(); Iterator i = a.iterator(); while (i.hasNext()) {    Object obj = i.next();    Country country = (Country)obj;
    this will definitely solve the problem.
    regards
    srini

  • Executing the stored procedure with output which is a collection of objects

    Hello,
    I have the objects and collection of objects within an objects as below:
    CREATE OR REPLACE TYPE SHARE_OUTST_T
    AS OBJECT
    SHR_OUTST_AMT     number
    CREATE OR REPLACE TYPE SECURITY_T
    AS OBJECT
         VOTE_PER_SHR     number
    , CUSIP     varchar2(12)
    , EXCHANGE     varchar2(10)
    , IV_TYPE_CD     varchar2(10)
    , SEC_TICKER_SYMB     varchar2(20)
    CREATE OR REPLACE TYPE ALTERNATE_ID_T
    AS OBJECT
    ( ALT_ID_TYPE     varchar2(20)
    CREATE OR REPLACE TYPE ISSUE_MAINT_VERSION_T
    AS OBJECT
         IM_KEY_ID number     
    ,     IM_VER_NUM number
    ,     EFF_TMSTMP timestamp
    , EXP_TMSTMP timestamp
    ,     NEXT_REVIEW_TMSTMP timestamp
    ,     APPR_STATUS_REF_ID number
    , VOTE number
    , ADD_USR_ID varchar2(20)
    , ADD_TMSTMP timestamp
    , UPD_USR_ID varchar2(20)
    , UPD_TMSTMP timestamp
    , LOCK_LEVEL_NUM number
    , ACTION VARCHAR2(1)
    CREATE OR REPLACE TYPE ISSUE_SHARE_MAINT_T
    AS OBJECT
         IM_KEY_ID      number     
    ,     IM_VER_NUM      number
    ,     SHR_OUTST_AMT      number
    ,     CURR_OUTST_AMT     number
    ,      ADD_USR_ID      varchar2(20)
    ,      ADD_TMSTMP      timestamp
    ,      UPD_USR_ID      varchar2(20)
    ,      UPD_TMSTMP      timestamp
    ,      LOCK_LEVEL_NUM      number
    ,     ACTION     VARCHAR2(1)
    CREATE OR REPLACE TYPE ISSUE_MAINT_COMMENT_T
    AS OBJECT
         IM_KEY_ID      number     
    ,     IM_VER_NUM      number
    ,     COMMENT_TXT     varchar2(400)
    ,      ADD_USR_ID      varchar2(20)
    ,      ADD_TMSTMP      timestamp
    ,      UPD_USR_ID      varchar2(20)
    ,      UPD_TMSTMP      timestamp
    ,      LOCK_LEVEL_NUM      number
    ,     ACTION     VARCHAR2(1)
    CREATE OR REPLACE TYPE ISSUE_MAINT_COMMENT_COL_T AS TABLE OF ISSUE_MAINT_COMMENT_T;
    CREATE OR REPLACE TYPE ISSUE_VERSION_T
    AS OBJECT
         SHARE_OUTST     SHARE_OUTST_T
    ,     SECURITY     SECURITY_T
    ,     ALTERNATE_ID     ALTERNATE_ID_T
    ,     ISSUER     ISSUER_T
    ,     ISSUE_MAINT_VERSION     ISSUE_MAINT_VERSION_T
    ,     ISSUE_SHARE_MAINT     ISSUE_SHARE_MAINT_T
    , ISSUE_MAINT_COMMENT_COL ISSUE_MAINT_COMMENT_T
    CREATE OR REPLACE TYPE ISSUE_VERSION_COL_T AS TABLE OF ISSUE_VERSION_T;
    And the stored procedure as :
    =======================================
    PROCEDURE get_all_issue_version_col
    ( pv_issue_version_col OUT issue_version_col_t
    AS
    CURSOR cur_issue_version
    IS
    SELECT
    issue_version_t (
    SHARE_OUTST_T (so.shr_outst_amt )
    , SECURITY_T ( s.vote_per_shr
    , s.sec_cusip
    , s.PRI_MKT_EXCH_CD
    , s.IV_TYPE_CD
    , s.SEC_TICKER_SYMB )
    , ALTERNATE_ID_T (a.ALT_ID_TYPE)
    , ISSUER_T (i.ISSR_ID )
    , ISSUE_MAINT_VERSION_T (imv.im_key_id
    , imv.im_ver_num
    , imv.eff_tmstmp
    , imv.exp_tmstmp
    , imv.next_review_tmstmp
    , imv.appr_status_ref_id
    , imv.vote
    , imv.add_usr_id
    , imv.add_tmstmp
    , imv.upd_usr_id
    , imv.upd_tmstmp
    , imv.lock_level_num
    , NULL )
    , ISSUE_SHARE_MAINT_T (ism.im_key_id
    , ism.im_ver_num
    , ism.shr_outst_amt
    , ism.curr_outst_amt
    , ism.add_usr_id
    , ism.add_tmstmp
    , ism.upd_usr_id
    , ism.upd_tmstmp
    , ism.lock_level_num
    , NULL)
    , ISSUE_MAINT_COMMENT_T(imc.im_key_id
    , imc.im_ver_num
    , imc.comment_txt
    , imc.add_usr_id
    , imc.add_tmstmp
    , imc.upd_usr_id
    , imc.upd_tmstmp
    , imc.lock_level_num
    , NULL )
    FROM
    share_outst so
    , security s
    , alternate_id a
    , issuer i
    , issue_maintenance_version imv
    , issue_share_maintenance ism
    , issue_maintenance_comment imc
    WHERE
    s.sec_key_id = so.SEC_KEY_ID
    and s.SEC_KEY_ID = a.SEC_KEY_ID
    and s.MSTR_ISSR_KEY_ID = i.ISSR_KEY_ID
    and s.SEC_CUSIP = imv.SEC_CUSIP (+)
    and s.SEC_CUSIP = ism.SEC_CUSIP (+)
    and imv.IM_KEY_ID = imc.IM_KEY_ID (+);
    BEGIN
    OPEN cur_issue_version ;
    FETCH cur_issue_version BULK COLLECT INTO pv_issue_version_col ;
    CLOSE cur_issue_version ;
    END ;
    PROCEDURE get_all_issue_col_v1
    ( pv_issue_version_col OUT NOCOPY issue_version_col_t
    , pv_row_count IN number
    , pv_issuer_id IN VARCHAR2
    AS
    CURSOR cur_issue_version
    IS
    SELECT
    issue_version_t (
    SHARE_OUTST_T (so.shr_outst_amt )
    , SECURITY_T ( s.vote_per_shr
    , s.sec_cusip
    , s.PRI_MKT_EXCH_CD
    , s.IV_TYPE_CD
    , s.SEC_TICKER_SYMB )
    , ALTERNATE_ID_T (a.ALT_ID_TYPE)
    , ISSUER_T (i.ISSR_ID )
    , ISSUE_MAINT_VERSION_T (imv.im_key_id
    , imv.im_ver_num
    , imv.eff_tmstmp
    , imv.exp_tmstmp
    , imv.next_review_tmstmp
    , imv.appr_status_ref_id
    , imv.vote
    , imv.add_usr_id
    , imv.add_tmstmp
    , imv.upd_usr_id
    , imv.upd_tmstmp
    , imv.lock_level_num
    , NULL )
    , ISSUE_SHARE_MAINT_T (ism.im_key_id
    , ism.im_ver_num
    , ism.shr_outst_amt
    , ism.curr_outst_amt
    , ism.add_usr_id
    , ism.add_tmstmp
    , ism.upd_usr_id
    , ism.upd_tmstmp
    , ism.lock_level_num
    , NULL)
    , ISSUE_MAINT_COMMENT_T(imc.im_key_id
    , imc.im_ver_num
    , imc.comment_txt
    , imc.add_usr_id
    , imc.add_tmstmp
    , imc.upd_usr_id
    , imc.upd_tmstmp
    , imc.lock_level_num
    , NULL )
    FROM
    share_outst so
    , security s
    , alternate_id a
    , issuer i
    , issue_maintenance_version imv
    , issue_share_maintenance ism
    , issue_maintenance_comment imc
    WHERE
    s.sec_key_id = so.SEC_KEY_ID
    and s.SEC_KEY_ID = a.SEC_KEY_ID
    and s.MSTR_ISSR_KEY_ID = i.ISSR_KEY_ID
    and s.SEC_CUSIP = imv.SEC_CUSIP (+)
    and s.SEC_CUSIP = ism.SEC_CUSIP (+)
    and imv.IM_KEY_ID = imc.IM_KEY_ID (+);
    BEGIN
    OPEN cur_issue_version ;
    FETCH cur_issue_version BULK COLLECT INTO pv_issue_version_col ;
    CLOSE cur_issue_version ;
    END ;
    ====================
    When I execute this stored procedure thru rapid sql, I get error
    Error: ORA-06550: line 1, column 21:
    PLS-00306: wrong number or types of arguments in call to 'GET_ALL_ISSUE_VERSION_COL'
    ORA-06550: line 1, column 21:
    PL/SQL: Statement ignored, Batch 1 Line 1 Col 21
    What is that I am missing?
    Any help would be greatly appreciated.

    I've never tried Rapid SQL, but my guess is that you can't pass objects through it. I'd write a test case on the server and try it there. It looks like it should work but I didn't build a test case. If it works on the server but not in the tool, it's like the tool. OCI8 doesn't support passing instantiated objects.

  • Collection of Objects for Transporting to Test Box

    Hi Experts,
    I am ready to transport from BW Dev system to Testing system.Actually some of the Objects activated before for diffrent applications like FI-CO,SD and CRM and exported to testing system.Now My turn to export some of the objects to test box.
    I am little bit in confusion.How do I collect the objects which I activted with my own request.I am sure I don't need to transport the Objects which already in Test box though my functional application required the same objects.If So how can I find which Objects are in Test box already or not.Is there any particular method to find which objects are not transported from Development to Testing.Please advise me.I need to finish my Transports by the tomorrow.I am running with urgency.
    Thanks,
    Suryam.

    Hi,
    Unfortunatelly for you, the best way is to collect through the transport collector in RSA1 all the objects that are needed for your solution.
    Normally if you did not change anything on objects that are already transported, the system will not collect them.
    But I would say that there is no added value to make a difference between stuff that were already transported and the other objects as in Dev you are aroking with them correctly....
    Hope it helps
    PYG

  • Passing of Collection of Objects

    I am using Collection of Objects to pass data between Java class and stored packages. Sometimes the error 'Handle is not valid' happens. When we recycle the application, the problem goes away temporarily and but come back later. Does anyone encounter this situation?

    The JNI forum would have been a more obvious place to ask this, but...
    The object of type "jobjectarray " which can be used with jni, i think can hold only objects of same type.So make that type Object, and wrap the primitives in their primitive wrappers (Integer, etc.)

  • Any API to get a collection of object and it's property in a page

    Just wondering whether Oracle provides any API which is able to return a collection of object in page and then I can read the object name and its attributes. If such API exists, it will make my life easier to code the logic because I don't have to hardcode the object name.

    I found the solution myself:
    Using a cursor of
    select ITEM_NAME, LABEL from APEX_030200.APEX_APPLICATION_PAGE_ITEMS
    where
    workspace=[Workspace Name] and
    application_id=[APP_ID] and
    page_id=[PAGE ID]
    order by
    display_sequence;
    Then I can use v("ITEM_NAME") to find out the values of each page item. With this method I don't have to hardcode all the item name in the PL/SQL code. e.g. If I want to validate a page that all items cannot be empty, I can use this way, rather then creating multiple validation rules.

  • Create New Operations for data collection(View Object)

    ADF data collection(View Object) supports Create, CreateInsert, Delete, etc operations.
    And would like to add more operations like clear, etc. How do i create my own operation and add it to data control for all the view objects in the data control.
    Thanks
    JP

    hi esjp2000
    I'm not sure what kind or "clear operation" you are looking for, but I recently asked about a "clear search" in this forum thread:
    " ADF BC : "clear search" using executeEmptyRowSet() "
    ADF BC : "clear search" using executeEmptyRowSet()
    It is about the executeEmptyRowSet() method, and that might not be what you are looking for. (It might not even be what I am looking for because it is undocumented and that is what my question is about and I haven't had an aswer yet.)
    But ... it does provide an example of a "service method" Shay is referring to, in the example application:
    http://verveja.footsteps.be/~verveja/files/oracle/ClearSearchStuff-v0.01.zip
    (So, the specific service method implementation, "ScottServiceImpl.executeEmptyRowSetOnEmpWithParamsVOVI()" in the example, would be different in your case, depending on the specific "clear operation" you are looking for.)
    success
    Jan Vervecken

  • Transport Error RSO 252 while collecting any object in RSA1

    Hi All,
    I am having weired issue while collecting any objects in my BI dev system. It gives me  error as below. I tried to look these objects in meta data repostiroty but it has been deleted already in Dev and QA system. My objects are not using or have links with these objects as coming as Error messages.
    I also looked in tables rsaabap, RSAROUTT and RSTRANFIELD but there are not such entry . I also checked OSS note 1157803 but we are already on that.
    Error as Below -
    Object 'D7JIR90N4P32W3BWRLGKIUI7Y' (ROUT) of type 'Routine' is not available in version 'A
    Object '0SU9V7HTBXK9EKJA7GEFCPFG6BOJ6SIX' (TRFN) of type 'Transformation' is not available
    Object 'D7JIQIPM4XLMG0CCYAXPYH1VI' (ROUT) of type 'Routine' is not available in version 'A
    Diagnosis
    You wanted to generate an object with the name Object '0SU9V7HTBXK9EKJA7GEFCPFG6BOJ6SIX'  (in transport request TRFN) of type 'Routine' (TLOGO). This is, however, not available in the BW Repository database. It does not exist in the requested version A. If the version is 'D' then it is possible that an error arose during the delivery or installation. If the version is 'A' then the Object was either not created or not activated.
    System Response
    The object was not taken into account in the next stage of processing.
    Any help would be appriciated.
    Thanks in Advance.
    Vikas

    Hi Vikas,
    Try to find out these objects using SE03. 'Search for objects in Transport Requests', and check what happened to those objects/requests.
    Regards,
    Pratap Sone

  • How do you retrieve a Collection of objects using JDBC?

    How do you retrieve a Collection of objects using JDBC.
    MORE INFO:
    I have created a class i.e. Account class and I want to retrieve all the accounts previously created for accounts in my Mysql database..
    my method would retrieve an array of Account instances in the database i.e.
    public Vector retrieveAccounts();

    Connection con = null;
    ArrayList accounts = new ArrayList();
    try{
      con = DriverManager.getConnection(...);
      PreparedStatement ps = con.prepareStatement("select * from accounts");
      Resultset rs = ps.executeQuery();
      while (rs.next()) {
        Account account = new Account(rs.getString(1), rs.getString(2), ...);
        accounts.add(account);
      Account[] account_array = new Account[accounts.size()];
      accounts.toArray(account_array);
    catch (SQLException sqle) {
       sqle.printStackTrace();
    finally {
      if (con != null) {
        con.close();
    }should pretty much to what you want, you will obviously need to change it so that, a) the SQL query is correct and b) the Account class is correct and c) the correct values are taken from the result set to create an account.

  • UI API Collection vs Object

    Hi there, what is the main purpose that the objects' structure for the SAPbouiCOM.dll are divided into collection and object itself... why we need collection (eg. Form Collection and Menu Collection)?
    Thanks.

    Hi,
    These collections are very useful as they contain all the instances of the object in the SBO application when the UI API addon is running. For example, if you want to be able to see which forms the user has open within the SBO client, you can use the Application.Forms collection to iterate through the open forms. Without this collection, you'd have no way of knowing what the user had open. The menu collection is arguably less useful but there are circumstances where you need to iterate through the menus to find if a particular menu id exists.
    Kind Regards,
    Owen

  • Unique Collection of objects

    What collection can I use to maintain a unique collection of
    objects? (i.e. a set).

    Boooooooh!
    Looks like you're right, you can't override the equality
    operation in Flex. You can try and use ObjectUtil.compare(Object,
    Object).
    http://danielroop.com/blog/2007/09/02/actionscript-30-object-equality/
    But it looks like you can implement the valueOf method and
    get behavior similar to what I am looking for.
    http://gamesandtech.wordpress.com/2008/02/03/comparing-objects-in-actionscript/

  • How to process a collection of objects of a derived class?

    I'm trying to clean up some duplicated code.
    I have several classes that have a common parent class. I have in my application several searching and sorting functions that operate on these child classes. But I realized that this is code duplication, as these functions only need data members of the common parent class. So I figured I could make these functions operate on collections of the parent class.
    But during refactoring, I ran into a compiler error that surprised me. This is the SSCCE:
    import java.util.*;
    public class Tinker {
      static class ParentClass {}
      static class ChildClass extends ParentClass {}
      static void processClassCollection( Collection< ParentClass > c ) {}
      public static void main( String[] args ) {
        Collection< ParentClass > parentClassCollection = new Vector< ParentClass >();
        Collection< ChildClass > childClassCollection = new Vector< ChildClass >();
        processClassCollection( parentClassCollection );
        processClassCollection( childClassCollection ); // Why won't this compile?
    }Every object of type ChildClass is also of type ParentClass, right? Every function that requires a ParentClass object, can be passed a ChildClass, right?
    Then, if a function requires a Collection< ParentClass >, why can't I pass it a Collection< ChildClass >?
    Apparently there is a gap of my understanding, either of inheritance, or of Collections. I would very much appreciate clarification, and any suggestion how to deal with such a case.
    -Ron.

    ejp wrote:
    Why can't a Collection< ChildClass > be used where a Collection< ParentClass > is expected?Because Collection< ChildClass > doesn't extend Collection< ParentClass >. They are separate unrelated types.And I think part of the reason this is not allowed. i.e. you can pass ChildClass to a method which expects a ParentClass. is that java doesn't know if you are just looking at the Collection or modifying it. If you could add anything which extends ParentClass to the collection, the collection of ChildClass would not be valid any more.
    The difference is that in the first case, you are passing the reference by value and changing it in the method has no impact on the caller. However, in the case of the Collection, you could corrupt it if you can add objects which the caller does not expect to be in it.

  • Garbage collection of objects created inside a method

    I have method and inside the method I create new Objects I mean I instantiate objects using new and call some methods on these objects.
    once the method execution is completed and control goes to caller of the method will all the object created inside the method will be garbage collected ?
    here with code
               public List<StgAuditGeneral> getAudits(
              List<StgAuditGeneral>  audits= new ArrayList<StgAuditGeneral>();
                  for(Map<String, String> result :results ){
                   audits.add(new MapToObject<StgAuditGeneral>() {
                        @Override
                        public StgAuditGeneral getObject() {
                                             StgAuditGeneral  stg= new StgAuditGeneral();
                             return stg;
                   }.getObject());
              }in the above method I cam creating tons of objects wil they be garbage collected immediatedly after jvm leaves the method ?

    user11138293 wrote:
    I have method and inside the method I create new Objects I mean I instantiate objects using new and call some methods on these objects.
    once the method execution is completed and control goes to caller of the method will all the object created inside the method will be garbage collected ?If there are no reachable references, to those objects, then when the method ends, they become eligible for GC. If and when they are actually collected is something we can't know or control, and generally don't care about. The only guarantee is that everything that can be collected will be collected before an OutOfMemoryError is thrown. So from our perspective, once it's eligible for collection, it is effectively collected.
    If you pass references to those objects to something else that holds onto them after the method ends, then they are still reachable, and not eligible for collection.
    However, you almost never need to even think about whether something is eligible for GC or not. It works pretty intuitively.

  • Web Service Request Collection/Complex Objects doesn't work

    I am unable to call a .net web service using Adobe LiveCycle Designer 8.0. My test web service accepts either a complex object or a collection of the same object.
    EX)
    [WebMethod]
    public string CostChange(CostChangeNotificationItem change1, CostChangeNotificationItem change2)
    return "Success";
    [WebMethod]
    public string CostChangeColl(CostChangeNotificationCol changes)
    return "Success";
    I can successfullly create the connection to the web service. When i drag and drop the connection request/button/and response onto the designer i can call the web service successfully.
    However you never see the request objects on the form unless you change the subforms to flowed and the min and initial count of the object to 1. When this is done the web service never gets called. You can click the button until you are blue in the face with no successful call.

    Hello ,
    our problem was a result of a corrupt database. Please check the Log files in CUCM . have a look for "missed table entries "
    cli
    utils dbreplication repair
    check logs again    the path to the log is displayed after the repair.
    hope it helps
    good luck

Maybe you are looking for

  • Problem with restore database in sql server 2008

    hi,,,when i want to restore database from a .bak file i see this error TITLE: Microsoft SQL Server Management Studio Restore failed for Server 'ALI-PC'.  (Microsoft.SqlServer.SmoExtended) For help, click: http://go.microsoft.com/fwlink?ProdName=Micro

  • How do I get my Course Manager to display in English and not German?

    My company is registered in both Germany and United Kingdom, and conduct business mainly in English Language. I signed up for iTunesU in order to create courses to share on iTunesU on behalf of my college. However, each time I insert the link below t

  • Request stays in Authorizing state even after approval

    I've been trying to debug this for days now and it completely breaks my lab - until it fixes itself after some random time and then breaks again I created a simple approval workflow which seeks approval from [//Target/Owner] when joining an Owner App

  • Editing photo properties manually

    Can someone tell me how to override the automatic date and time stamps on photos? I have a series of pics I need to edit manually. Message Edited by mookiemike on 10-11-2008 01:09 AM Message Edited by mookiemike on 10-11-2008 01:10 AM Message Edited

  • TextArea in Table

    Hi! I am trying to include a textArea as one of the cells in a JTable. I tried doing this: public class MyCellRen extends JTextArea implements TableCellRenderer MyCellRen() super(); public Component getTableCellRendererComponent(JTable table, Object