Programming data interface

Hello,
I am pretty new at java programming and I have to write an interface with an external system sending data to our system in some ValueObject formats. I want to create my own Object for interface purposes, but I
don't have a clue what to use: Vector, HashTable, Array???
The structure I would like to have is as follows:
OBJECT: -> tableName (String)
-> Records -> Record1 ->Field1 ->fieldName
->fieldValue
->fieldType
->fieldFormat
->Field2 ->fieldName
->fieldValue
->fieldType
->fieldFormat
->...
->Fieldn
-> Record2 ->Field1...
-> Record3
-> ...
-> Recordn
So, the number of records is unknown and the number of fields is also
unknown as this can be for different database tables.
If anybody could help me with this I would be really greatful...
Or if somebody already did something like this and can give me some
example code, also very helpful!
Or maybe if you would have a better idea than my structure to create
an object containing data that has to be inserted in a database table
let me know!
Thanks a lot,
Sven

The following is a fairly simple way of doing something similar to what you want to do. However it assumes that you are being sent an ObjectStream (If not then the AField will have to change so that it reads the different types of data and then converts to a string)
It also depends on the mark operation which I fear may not be suppprted for ObjectInputStreams.
This code probably won't do what you want it to do, but I hope it should give a good starting point.
-Philip.
import java.util.*;
import java.io.*;
class AField {
    String name;
    String value;
    String type;
    String format;
    public int hashCode(){
        return name.hashCode();
    public static AField readAField(ObjectInputStream in){
        AField toReturn = new AField();
        try{
            toReturn.name = (String)in.readObject();
            toReturn.value = (String)in.readObject();
            toReturn.type = (String)in.readObject();
            toReturn.format = (String)in.readObject();
            return toReturn;
        }catch (Exception e){
            return null;
class ARecord{
    Set fields = new HashSet();
    public static ARecord readARecord(ObjectInputStream in){
        ARecord toReturn = new ARecord();
        boolean finished = false;
        try{
            while (!finished){
                in.mark(4096);
                AField temp = AField.readAField(in);
                if (toReturn.fields.contains(temp)){
                    in.reset();
                    finished = true;
                } else
                    toReturn.fields.add(temp);
        }catch (Exception e) {}
        return toReturn;
class Table {
    ArrayList records = new ArrayList();
    String name;
    public static Table readTable(ObjectInputStream in){
        Table toReturn = new Table();
        try{
            toReturn.name = (String)in.readObject();
            while (in.available() !=0){
                toReturn.records.add(ARecord.readARecord(in));
        }catch (Exception e){}
        return toReturn;

Similar Messages

  • Will somebody provide me with a QBASIC 4.5 PROGRAM for Interfacing with a Anritsu make(model-MS710) Rf spectrum analyser through GPIB ( NI-488.2 ) in DOS environment? I would like to aquire from the instrument and save the data in PC.the data

    Will somebody provide me with a QBASIC 4.5 PROGRAM for Interfacing with an Anritsu make(model-MS710) RFspectrum analyser through GPIB ( NI-488.2 ) in DOS environment? I would like to aquire data from the instrument and save it in PC for printing purpose.

    Hello,
    Unfortunately I was unable to find a driver for this instrument. This leaves you with one of a couple options. First, I would like you to submit a request for this driver at:
    http://www.ni.com/devzone/idnet/other.htm
    We develop drivers in CVI and LabVIEW based on demand and popularity so the more requests we have for it, the greater the possibility that we will develop one. While this would not provide you with a QBASIC program, you may be able to create a DLL that you could call from QBASIC.
    If you would like to try developing your own instrument driver (or modify the existing one), we have documentation, model instrument drivers, and driver templates to help at :
    http://www.ni.com/devzone/idnet/development.htm
    We also have a syndica
    te of third party vendors that specialize in National Instruments' products and services. Some of the vendors specialize in driver development. I would suggest contacting one of the Alliance members at:
    http://www.ni.com/alliance
    Good Luck,
    Kim L.
    Applications Engineer
    National Instruments

  • Getting error while reading file from /data/interface

    HI Experts,
    while i am executing the job MPU* in ECC it write error file in /data/interface/sidclntxxx/IN/MPU742. now for the tcode ZMM_MPU_ANALYSIS it ask that error file, it is reflecting "error reading log file /data/interface...". now i am not getting the email also that supposed to get. please help
    Edited by: stiw382 on Dec 1, 2011 1:17 PM

    > while i am executing the job MPU* in ECC it write error file in /data/interface/sidclntxxx/IN/MPU742. now for the tcode ZMM_MPU_ANALYSIS it ask that error file, it is reflecting "error reading log file /data/interface...". now i am not getting the email also that supposed to get. please help
    is that file accessible on the operating system? Is the filesystem mounted?
    Z-transaction codes are customer developments, since nobody here knows, what this program does I suggest you contact the developer of that transaction.
    Markus

  • Difference between conversion program and Interface program

    Hi All,
    Can any body tell me what's the exact differenct between conversion program and Interface program?How will we will classify an object whether it is converion or Interface?
    Thanks&Regards
    Mahesh

    hi,
    conversion program is your migration- or mapping- program to convert data in the format of the SAP-Interface
    example:
    -(customer)conversion program for vendors ZFKMIGR01 creates a file in the format of interface RFBIKR00
    with the foll. structures
    BGR00
    BLFA1
    BLFB1
    BLFBK
    hope that helps
    Andreas

  • Difference between Class Pool program and Interface Pool program

    Both Class Pool program and an Interface Pool program indicate that the program contains interfaces that other programs can use globally. What exactly is the difference between them?

    Transparent Table :
    Exists with the same structure both in dictionary as well as in database exactly with the same data and fields.
    " Pooled Table :
    Pooled tables are logical tables that must be assigned to a table pool when they are defined. Pooled tables are used to store control data. Several pooled tables can be cominied in a table pool. The data of these pooled tables are then sorted in a common table in the database.
    " Cluster Table :
    Cluster tables are logical tables that must be assigned to a table cluster when they are defined. Cluster tables can be used to strore control data. They can also be used to store temporary data or texts, such as documentation.
    " what is the major difference between Standard tables, Pooled tables and
    " Clusterd Tables?
    A transparent table is a table that stores data directly. You can read these tables directly on the database from outside SAP with for instance an SQL statement.
    Transparent table is a one to one relation table i.e. when you create one transparent table then exactly same table will create in data base and if is basically used to store transaction data.
    A clustered and a pooled table cannot be read from outside SAP because certain data are clustered and pooled in one field.
    One of the possible reasons is for instance that their content can be variable in length and build up. Database manipulations in Abap are limited as well.
    But pool and cluster table is a many to one relationship table. This means many pool table store in a database table which is know as table pool.
    All the pool table stored table in table pool does not need to have any foreign key relationship but in the case of cluster table it is must. And pool and cluster table is basically use to store application data.
    Table pool can contain 10 to 1000 small pool table which has 10 to 100 records. But cluster table can contain very big but few (1 to 10) cluster table.
    For pool and cluster table you can create secondary index and you can use select distinct, group for pool and cluster table. You can use native SQL statement for pool and cluster table.
    A structure is a table without data. It is only filled by program logic at the moment it is needed starting from tables.
    A view is a way of looking at the contents of tables. It only contains the combination of the tables at the basis and the way the data needs to be represented. You actually call directly upon the underlying tables.
    . Transparent tables (BKPF, VBAK, VBAP, KNA1, COEP)
    Allows secondary indexes (SE11->Display Table->Indexes)
    Can be buffered (SE11->Display Table->technical settings) Heavily updated tables should not be buffered.
    II. Pool Tables (match codes, look up tables)
    Should be accessed via primary key or
    Should be buffered (SE11->Display Table->technical settings)
    No secondary indexes
    Select * is Ok because all columns retrieved anyway
    III. Cluster Tables (BSEG,BSEC)
    Should be accessed via primary key - very fast retrieval otherwise very slow
    No secondary indexes
    Select * is Ok because all columns retrieved anyway.
    Performing an operation on multiple rows is more efficient than single row operations.
    Therefore you still want to select into an internal table.
    If many rows are being selected into the internal table,
    you might still like to retrieve specific columns to cut down on the memory required.
    Statistical SQL functions (SUM, AVG, MIN, MAX, etc) not supported
    Can not be buffered
    IV. Buffered Tables (includes both Transparent & Pool Tables)
    While buffering database tables in program memory (SELECT into internal table) is generally a good idea for performance,
    it is not always necessary.
    Some tables are already buffered in memory.
    These are mostly configuration tables.
    If a table is already buffered, then a select statement against it is very fast.
    To determine if a table is buffered, choose the 'technical settings' soft button from the data dictionary
    display of a table (SE12). Pool tables should all be buffered.
    More at this link.
    http://help.sap.com/saphelp_erp2004/helpdata/en/81/415d363640933fe10000009b38f839/frameset.htm
    Transparent Table:
    Exists with the same structure both in dictionary as well as in database exactly with the same data and fields.
    Pooled Table:
    Pooled tables are logical tables that must be assigned to a table pool when they are defined. Pooled tables are used to store control data. Several pooled tables can be cominied in a table pool. The data of these pooled tables are then sorted in a common table in the database.
    Cluster Table:
    Cluster tables are logical tables that must be assigned to a table cluster when they are defined. Cluster tables can be used to strore control data. They can also be used to store temporary data or texts, such as documentation.
    A transparent table is a table that stores data directly. You can read these tables directly on the database from outside SAP with for instance an SQL statement.
    Transparent table is a one to one relation table i.e. when you create one transparent table then exactly same table will create in data base and if is basically used to store transaction data.
    A clustered and a pooled table cannot be read from outside SAP because certain data are clustered and pooled in one field.
    One of the possible reasons is for instance that their content can be variable in length and build up. Database manipulations in Abap are limited as well.
    But pool and cluster table is a many to one relationship table. This means many pool table store in a database table which is know as table pool.
    All the pool table stored table in table pool does not need to have any foreign key relationship but in the case of cluster table it is must. And pool and cluster table is basically use to store application data.
    Table pool can contain 10 to 1000 small pool table which has 10 to 100 records. But cluster table can contain very big but few (1 to 10) cluster table.
    For pool and cluster table you can create secondary index and you can use select distinct, group for pool and cluster table. You can use native SQL statement for pool and cluster table.
    A structure is a table without data. It is only filled by program logic at the moment it is needed starting from tables.
    A view is a way of looking at the contents of tables. It only contains the combination of the tables at the basis and the way the data needs to be represented. You actually call directly upon the underlying tables.
    http://www.datamanagementgroup.com/Resources/Articles/Article_0106_2.asp
    more info
    http://help.sap.com/saphelp_erp2004/helpdata/en/81/415d363640933fe10000009b38f839/frameset.htm
    http://cma.zdnet.com/book/abap/ch03/ch03.htm
    Check this links.
    http://help.sap.com/saphelp_40b/helpdata/en/4f/991f82446d11d189700000e8322d00/applet.htm
    http://www.techinterviews.com/?p=198

  • Windows 8.1 search not working- program- data missing

    Hi :)
    I followed the instructions here 
    http://social.technet.microsoft.com/Forums/windows/en-US/bb1ba41a-80d9-4036-974b-50e81dc99893/windows-81-search-not-working?forum=w8itprogeneral
    but program-data is not in there
    Tried searching for how to correct this but no luck atm
    Any advic eplease
    Cheers :)

    Hi,
    Please show hidden files and then you will see ProgramData, then try the steps in the link you mentioned.
    Please also try this command to repair your PC:
    dism /online /cleanup-image /restorehealth
    Kate Li
    TechNet Community Support

  • How to add an image - binary data is present in data interface

    Hi,
    we have the requirement that an image (e.g. pie chart) has to be present in a print form. Based on the data, the image always differs. It is not possible to set an URL to get the image so we decided to store the binary data in the data interface.
    Is it possible to map the image control to the data structure?
    How can we store the binary content of an image in the data structure (please think about unicode and non-unicode ERP systems)?
    Do you have any idea?
    Thank you very much.
    Thomas

    Hi Thomas,
                     You need to create an image field and in the source choose 'graphic content ; give the name of the variable which has the binary data . and give the type as 'MIME/image'.

  • Error message-The installer has insufficent privileges to modify this file:C:\Program Data\microsoft\windows\start menu\programs\iTunes\.iTunes.ink

    error message-The installer has insufficent privileges to modify this file:C:\Program Data\microsoft\windows\start menu\programs\iTunes\.iTunes.ink     
    How do I correct this to download iTunes so it will run?

    That one's consistent with disk/file damage. The first thing I'd try with that is running a disk check (chkdsk) over your C drive.
    XP instructions in the following document: How to perform disk error checking in Windows XP
    Vista instructions in the following document: Check your hard disk for errors
    Windows 7 instructions in the following document: How to use CHKDSK (Check Disk)
    Select both Automatically fix file system errors and Scan for and attempt recovery of bad sectors, or use chkdsk /r (depending on which way you decide to go about doing this). You'll almost certainly have to schedule the chkdsk to run on startup. The scan should take quite a while ... if it quits after a few minutes or seconds, something's interfering with the scan.
    Does the chkdsk find/repair any damage? If so, can you get an install to go through properly afterwards?

  • Help with Data Interface

    Hello out there! I'm a second-year PhD student at Delaware State University, however I am just now starting to learn Labview. I have been assigned to a project that involves integrating first a Mach 5 100Hz Joulemeter to Labview, and then do a data interface with the detector to a laser, using Labview. I am reading the manuals and doing the exercises, but I need to have my learning curve sharpened! Any suggestions? Thanks.

    I'm not sure how much you know, but this contains a lot of basic stuff on getting started. 
    http://www.ni.com/gettingstarted/
    I also learn by example.
    Go to Help>Find Examples, this can teach you a lot. 
    Good Luck. 

  • How to refer the Program Data directory in Win 7 through Flex?

    Hi All..!
    I have a requirement, in which I have to store some files in the Program Data directory in Win 7... What I can't find is, how to get the path to this directory through Flex. I was hoping to find something similar to the File.userDirectory.resolvePath method... So far, nothing.. Also, I needed to know what is the equivalent folder of Program Data on Mac... Please help..
    Thanks..!!

    Create a servlet which gets an InputStream of the file and writes it to the OutputStream of the response and call this servlet in `src` attribute. That's basically all.
    Here's an example which covers the most of the minimum needs: [http://balusc.blogspot.com/2007/04/imageservlet.html].

  • Data interfacing from 3rd party system to SAP

    Dear all,
    We are going to upload employee masters, including actions, org assignment, personal information and other infotypes from a third-party system to SAP HCM.  May I know what should be the best approach, e.g. BDC, BAPIs, for these kinds of data interfacing?  I am thinking to use....
    BDC for hiring/transfer/termination actions (besides BDC, any other approaches?)
    RH_INSERT_INFTY or RH_UPDATE_INFTY for personal information / other infotypes updates
    However, I have no idea on how to automate updates of OM.  Please kindly share your thought, thank you!
    Best regards,
    Anne

    As I known , there is a interface tool named as IDOC.For more information , please ask your abap team.

  • Can't create directory c:\Program Data\Apple Computer\iTunes

    While installing iTunes, get message "can't create directory c:\Program Data\Apple Computer\iTunes.  After that, it uninstalls itunes and I'm back to square one.  What can I do or what could be causing this?

    First I think you'll find it is ProgramData without a space. Check for an existing iTunes folder at that location and rename it to Not iTunes. Try again.
    tt2

  • Can we do flash hook transfers or is there a data interface to the ACD?

    1) When using CVP, is it possible to do flash hook transfers or is there a data interface to the ACD?
    2) Is integration with the Cisco CTI engine available and the ease with which this can be accomplished?
    3) What Telephony Card it uses ?

    Hookflash is available in CVP from release 3.1 onwards.

  • Data Interface to mdp_matrix in demantra

    Hi,
    What all ways we have in demantra for data interface esp for mdp_matrix?
    Other than custom proc, integration interface, is there any other way to interface data from staging table to mdp_matrix table in demantra.
    Thanks & Regards,
    Ankur Dawra

    Hi MJ,
    Can we really update data in MDP_MATRIX table thru integration interface that is custom? As read in oracle guide that we cannot update data in mdp_matrix thru integration interface.
    Thanks & Regards,
    Ankur Dawra

  • How to connect Android CDC driver on OSX with ACM and ECM data interface

    I need to help connecting My android CDMA modem to OSX
    first I have attached some Picture on Windows. please see the picture as below.
    I want to connect to Redline box port same as on the OSX.
    but my OSX(Mountain Lion 10.8.2) had found 2 port
    SAMSUNG_MDM  and
    SAMSUNG_VSP
    MDM was working with AT command, but I don't need a AT command and Qualcomm Command did not working. (This command definition from out test tool)
    it is look like this  "00 + CRC", this string common command on the qualcomm chip android phones. with modem port(CDMA modem)
    VSP did not working without anything.
    I have googled on the internet, and I have found "dmesg"
    and then some messages show up
    ===============SHOW UP MESSAGS=======================================
    SMSIWirelessModem: USB Modem Line Control interface initialized
    SMSIWirelessModem: USB Modem Driver loaded for Samsung wireless Samsung device
    SMSIWirelessModem: Copyright (c) 2004-2008, Smith Micro Software, Inc. All Rights Reserved
    SMSIWirelessModem: Device Name is "SAMSUNG CDMA Technologies"
    0 1 AppleUSBCDCACMData: start - Find CDC driver for ACM data interface failed
    0 1 AppleUSBCDCECMData: start - Find CDC driver for ECM data interface failed
    SMSIWirelessModem: USB Modem Line Control interface closed
    SMSIWirelessModem: USB Modem interface closed
    =======================================================================
    Please I need a help reply to me
    and My email address is "[email protected]"

    How to solve the error?

Maybe you are looking for

  • Calendar, notes, reminders no longer syncing with iCloud or Google

    24 hours ago for an unknown reason the content of contacts, calender, notes and reminders disappeared. The contact is still on my ipad and macbook air and in the icloud - just not on my phone. Not sure why the sync has stopped for just one device. An

  • No AirPlay button in iTunes 11.1.3.8 for Windows 7 64-bit

    Hi guys,   I cannot figure this out - I tried everything I could think of...   I have my main iTunes library available for Home Sharing - now iTunes for Windows does not appear on AppleTV, iPad or iPhone in Remote or Music or Video at all. Moreover,

  • Why is my mixdown a blank/mute track?

    From the multitrack window I've tried mixing-down multiple audio files to a single file. When the process completes the new track is a blank waveform. Why?

  • No posting rules exist for account key

    Hi When i am creating PO with Excise, it shows the below error: No posting rules exist for account key Message no. FF714 Diagnosis No posting rules have been defined for the account key in the tax table in table T007B. Procedure Change the tax table,

  • Will Adobe ever get its act together?

    5 reasons why I’m sorry I settled on Photoshop Elements 6 as my photo organizer: 1.  Difficult or impossible to reload the program on a new hard drive or computer and have it mate up with the photo catalog created by the user. To play safe, is necess