Using a database as the table model for a large JTable

I have a swing application with a Jxtable (Jtable with extra features from swingx project) that displays the details of music files, album, artist ... . The data model is held in memory and unfortunately because there are 70 different columns and users a re tyrying to load their complete music collection (e.g 100,000 files) I am having memory issues.
I am now considering backing the data with a database and possibly using Hibernate. Do you think this is feasible or would it run too slowly, has anybody done this ?
The first issue is whether rows can be retrieved quickly enough as a user scrolls down a table , I thinking that if I use hibernate in conjunction with a database Iit caching will ome into play but will that solve the issue.
Also colums are sortable, so if a user clicked on a column it would somehow need access to every row in order to sort correctly.
Although the table column can have seventy columns by default only ten are shown, however the other sixty are still stored in the tables data model using valuable memory so I think I could grab some memory back here, but then if they decide to show the other 60 columns it could blow memory in one go.
I also considered using some kind of paging mechanism so that even if there were 100,000 rows loaded , only a 1000 were loaded into a table in one go, and you get to the bottom of the table the next 1000 are loaded, is this feasible I cannot work out how to even make a start on this.
thanks for any advice

A few things to check:
1. make sure your AS GroupRoleID class has RemoteClass
metadata like so:
[RemoteClass(alias="qa.data.inMemory.PlayerID")]
public class PlayerID extends Object {
2. make sure your AS GroupRoleID class is used in your mxml
file by declaring at least one variable of that type (even if you
don't instantiate or use it)
3. make sure your AS GroupRoleID class has a toString()
method that includes the roleId and groupId values to ensure each
instance returns a unique value.
When records appear to have matching identities this can
happen. Sometimes it can be because of an incorrect identity in
your destination but also if the object's toString() always returns
the same value (default being [object Type]).
I'm writing up a bug to look for a better way of ensuring
this uniqueness in the future.

Similar Messages

  • Using Logical Databases and the Tables or Nodes Statement

    I want to start using Logical Databases whenever possible, but it seems that I need to use the Tables or Nodes statement for the Get statement to work.  Is there anyway to avoid Tables/Nodes statement since they are obsolete (and still use LDBs)?
    Message was edited by: Jason DeLuca

    Hi Jason,
    1) table statement is obligatory:
    -> look at abap-docu to GET:
    node is a node in the logical database that is assigned to the report (type 1 program) in the program attributes. <b>You must declare the node in the report using the NODES statement (or the TABLES statement, if the node is of the type "table").</b>
    2) some ldb-selections from the selection screen
       depends on the table-statement too, i remember...
    regards Andreas

  • Use ComboBox TableCellEditor  - values are not saved to the table model

    Hi,
    I got a combobox cell editor that uses to edit one of the columns.
    And i got an ok button that uses to collect the data from the table and save it to the db.
    In case i started editing of a cell and the editor is still displayed- if i will click on the button the data that will be colected from the table model will not contained the updated value in the cell editor.
    In this case the user think his changes were saved but the last updated field is not updated.
    Is this a bug i got in the cell editor or this is the normal behaviour?
    Can it be fixed? (So that if the cell is in the middle of editing the value that will be saved is the last value that was selected).
    public class PriorityCellEditor extends StandardComboBox implements TableCellEditor {
        private boolean isEditMode=false;
         * A list of eventlisteners to call when an event is fired
        private EventListenerList listenerList = new EventListenerList();
         * the table model
        public StbAreaClusterPriorityCellEditor(boolean isEditMode) {
            super(StbAreaMapper.clustersPriorities);
            setEditMode(isEditMode);
            setEditable(false);
            this.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
            setAlignmentX(Component.LEFT_ALIGNMENT);
        public boolean isEditMode() {
            return isEditMode;
        public void setEditMode(boolean editMode) {
            isEditMode = editMode;
            setEnabled(editMode);
        public Component getTableCellEditorComponent(JTable table, Object value,boolean isSelecte, int row, int column) {
            int selectedIndex;
            if (isSelecte) {
                setForeground(table.getSelectionForeground());
                setBackground(table.getSelectionBackground());
            } else {
                setForeground(table.getForeground());
                setBackground(table.getBackground());
            if(value instanceof String){
                selectedIndex=StbAreaMapper.mapGuiPriorityDescToGuiCode((String)value);
                setSelectedIndex(selectedIndex);
            return this;
        public void cancelCellEditing() {
            fireEditingCanceled();
        public Object getCellEditorValue() {
            return getSelectedItem();
        public boolean isCellEditable(EventObject anEvent) {
            return isEditMode;
        public boolean shouldSelectCell(EventObject anEvent) {
            return false;
        public boolean stopCellEditing() {
            fireEditingStopped();
            return true;
         * Adds a new cellEditorListener to this cellEditor
        public void addCellEditorListener(CellEditorListener l) {
            listenerList.add(CellEditorListener.class, l);
         * Removes a cellEditorListener from this cellEditor
        public void removeCellEditorListener(CellEditorListener l) {
            listenerList.remove(CellEditorListener.class, l);
         * Notify all listeners that have registered interest for notification on
         * this event type.
         * @see javax.swing.event.EventListenerList
        protected void fireEditingStopped() {
            // Guaranteed to return a non-null array
            Object[] listeners = listenerList.getListenerList();
            // Process the listeners last to first, notifying
            // those that are interested in this event
            for (int i = listeners.length - 2; i >= 0; i -= 2) {
                if (listeners[i] == CellEditorListener.class) {
                    ((CellEditorListener) listeners[i + 1]).editingStopped(
                            new ChangeEvent(this));
         * Notify all listeners that have registered interest for notification on
         * this event type.
         * @see javax.swing.event.EventListenerList
        protected void fireEditingCanceled() {
            // Guaranteed to return a non-null array
            Object[] listeners = listenerList.getListenerList();
            // Process the listeners last to first, notifying those that are interested in this event
            for (int i = listeners.length - 2; i >= 0; i -= 2) {
                if (listeners[i] == CellEditorListener.class) {
                    ((CellEditorListener) listeners[i + 1]).editingCanceled(new ChangeEvent(this));
    }

    Try this
    yourTable.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);

  • How to change the table's for an existing report

    Hello,
    How can I change the table names for reports created with a different table name? for e.g If I created a report which included a table called "2009_10_example", How can I change that table to a different table "2010_10_example1".
    I am using Crystal reports 2008, and the reports were created using Report Creating Wizard.
    Thanks,
    Abhishek

    In the Database Menu, there is an option Set Datasource Location.  This allows you to pick a table from the current tables used, and select a table to replace it with.  Press the Update button, and Crystal will swap one for the other.  If the field names and data types are all the same, it will automatically change all references throughout the report to the new table's fields.
    May I suggest that your tables are set up improperly if you have to change report code to run it for different months?  The data should all be in one table with dates, and parameters to select the date range to report on.  (That was said in the spirit of helping...)
    HTH,
    Carl

  • What are the table names for CRM and APO?

    hi friends,
    what are the table names for CRM and APO?
    Regards
    suneel.

    hi Suneel,
    check in crm forum
    Re: SAP-CRM Tables
    BUT051 BP Relationship: Contact Person Relationship
    Similar to BUT050 , additionally contains Contact Person’s Address data
    BUT0BK Business Partner: Bank Data & Details
    BP Number, Bank Key, Bank Country Key, Bank Account Number
    BNKA Bank Master Data
    BUT100 BP: Roles
    ADR2 Telephone Numbers (Business Address Services)
    ADR6 SMTP Numbers (Business Address Services)
    Contains Email – Id of the BP.
    ADRC Addresses (Business Address Services)
    BP’s Complete Address Details- City, Country, Post Code, District, Street, Title No Etc
    TSAD3T Table containing the Title text against a Title No.
    COMM_PRODUCT Master Table for Product
    CRMM_BUAG Master table for Business Agreement
    CRMM_BUAG_H Header Data for Business Agreement such as Tax Category, Tax Characteristic, Form key, Business Agreement Class. Data in this table correspond to ISU CRMD_ORDERADM_H Contains the Header Information for a Business Transaction.
    Note:
    1. It doesn’t store the Business Partner
    responsible for the transaction. To
    get the Partner No, link it with
    CRM_ORDER_INDEX.
    2. This table can be used for search
    based on the Object Id(Business
    Transaction No).
    CRMD_CUSTOMER_H Additional Site Details at the Header Level of a Business Transaction
    CRMC_PROC_TYPE Master table Business Transaction Type
    CRMC_PARTNER_FCT Definition of Partner Functions
    SCPRIOT Priorities for Activities with priority text.
    CRMC_PROC_TYPE_T Text for a transaction type
    CRMC_ACT_OBJ_T Objective Number and Text for Activities
    TJ30T All the status code and text
    CRMC_PR_ASSIGN : Transaction Type and its Transaction Type Object.
    IBIB : Installed Base/Ibase
    IBIN : Installed Base Components
    COMM_PRODUCT : Products
    CRMC_T077D : customer account groups
    CRMD_ORDERADM_H (for header) CRMD_ORDERADM_I (Item data)
    CRMD_ORDERADM_H Business Transactions CRM
    CRMD_ACTIVITY_H Activity
    CRMD_OPPORT_H Opportunity
    BUTOO : Customer details
    BUT001 BP: General data II
    BUT100 BP: Roles
    BUT150 BP relationship: Attribute table (test
    different
    BUT_HIER_TREE Business Partner Group Hierarchy
    CDBC_T_PRODUCTID Mapping: Product Id
    CDBD_ORGMAN Business transaction - organizational unit -
    set
    COMC_PRODUCT General Product Settings
    COMC_R3_FIELDS Assignment of R/3 material master fields to
    CFOP
    COMM_CATEGORY Category
    COMM_CFGMAT Basic Data for Materials
    COMM_HIERARCHY Category Hierarchy
    COMP_TYPES Hierarchy Tool: Comparison Type Check
    Table
    CRMC_CPRICPROC Customer Pricing Procedures
    SMOKVBEZ15 Assignment employees to positions
    CRMMLSGUID: GUID entry (should match GUID in CRMPRLS)
    CRMM_BUT_CUSTNO : Also GUID table (GUID here should match GUID in R/3 table CRMKUNNR)
    SMOFSUBTAB : Mapping & Parameters
    SMOFDSTAT : Download Monitor (R4AM1)
    SMOFFILTAB : Filters (Should match filters in R3AC1 & R/3 Table CRMFILTAB)
    SMOFOBJECT Definition of Objects for Download
    SMOFOBJPAR Parent Objects of an Object in Table
    SMOFPARSFA Middleware Parameter
    SMOFQFIND Queue Finder Table for MW-Queue finder
    SMOFTABLES Definition of Tables for Download

  • Transfer Data from a JTable to the table model

    Hi
    I' looking for a simple method to transfer the last user input in a table to the table model.
    For example:
    In a Dialog the user insert in a JTable a few values and leaves with OK. But the last input is not saved in the model. It is just saved after selecting a new field in the JTable before leaving the Dialog.
    Is there a call to transfer all input to the model?
    Thanks
    Guido

    class MyJTable extends JTable (
    public boolean validateInput() {
    if(isEditing()) {
    return cellEditor.stopCellEditing();
    return true;
    Call this method whenever you want the input value to be stored in the table model. The return value can be false if the input isn't valid, this will depend on the cell editor.
    The idea is:
    Ask if the table has an editor activated. (isEditing())
    If so, request the editor to store the value in the model.
    I haven't prouved the code, sorry, but I hope you get the idea and helps.

  • How to get the table strucuture for multiple table

    I need to get the table structure for more than 40 table in a .txt file, is there any query to get this.
    I know how to get it individually but would be good if I can get it in one go
    Regards,

    You could write a procedure using DBMS_METADATA.GET_DDL + DBA|ALL|USER_TABLES
    or
    ask your DBA
    or
    get something like SQL Developer/PL/SQL Developer/TOAD...

  • Error message 'No entry in the table T589A for P 2'

    Hi all,
    I am updating the field of an infotype using the function module 'HR_INFOTYPE_OPERATION'. But the function module is not updating the field. Instead the return key of the function module has the message
    'No entry in the table T589A for P2'. The function module is called as follows:
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
      EXPORTING
        infty                  = '9900'
        number                 = wf_pernr
        SUBTYPE                = P9900-SUBTY
      OBJECTID               =
      LOCKINDICATOR          =
        VALIDITYEND            = P9900-ENDDA
        VALIDITYBEGIN          = P9900-BEGDA
      RECORDNUMBER           =
        record                 = p9900
        operation              = 'MOD'
      TCLAS                  = 'A'
       DIALOG_MODE            = '0'
       NOCOMMIT               =
      VIEW_IDENTIFIER        =
      SECONDARY_RECORD       =
    IMPORTING
       RETURN                 = wf_return
       KEY                    = wf_key
    Please suggest.
    regrds,
    madhu

    Hi,
    The table T589A is a configuration table pertaining to the pf status of the infotype. I changed the pf status of the infotype i.e. added my own buttons on application tool bar. May be cos of that it is giving error. Not sure.......

  • Using ElementDecl to access the content model

    Hi,
    Suppose I have an DTD that looks like the following:
    <!ELEMENT a (c*, d, e?, f+)>
    <!ELEMENT c (#PCDATA)>
    <!ELEMENT d EMPTY>
    <!ELEMENT e (#PCDATA)>
    <!ELEMENT f (g?, h+)>
    <!ELEMENT g EMPTY>
    <!ELEMENT h ANY>
    How do you get the content model for each one of the elements
    declared in this dtd? I tried to use the following code, but I
    get strange results.
    // Suppose edNode is the root of the DTD
    org.w3c.dom.Node cmNode = edNode.getParseTree();
    if (cmNode != null) {
    System.out.println("edNode = "+edNode.getNodeName()+" -
    "+edNode.getContentType());
    System.out.println("Children...");
    cmNode = cmNode.getFirstChild();
    while (cmNode != null) {
    System.out.println("cmNode = "+cmNode.getNodeName()+" -
    "+cmNode.getNodeType());
    cmNode = cmNode.getNextSibling();
    Thanks in advance,
    Renilton
    null

    Renilton Oliveira (guest) wrote:
    : Hi,
    : Suppose I have an DTD that looks like the following:
    : <!ELEMENT a (c*, d, e?, f+)>
    : <!ELEMENT c (#PCDATA)>
    : <!ELEMENT d EMPTY>
    : <!ELEMENT e (#PCDATA)>
    : <!ELEMENT f (g?, h+)>
    : <!ELEMENT g EMPTY>
    : <!ELEMENT h ANY>
    : How do you get the content model for each one of the elements
    : declared in this dtd? I tried to use the following code, but I
    : get strange results.
    : // Suppose edNode is the root of the DTD
    : org.w3c.dom.Node cmNode = edNode.getParseTree();
    : if (cmNode != null) {
    : System.out.println("edNode = "+edNode.getNodeName()+" -
    : "+edNode.getContentType());
    : System.out.println("Children...");
    : cmNode = cmNode.getFirstChild();
    : while (cmNode != null) {
    : System.out.println("cmNode = "+cmNode.getNodeName()+" -
    : "+cmNode.getNodeType());
    : cmNode = cmNode.getNextSibling();
    : Thanks in advance,
    : Renilton
    You code only descends to the first child node below the
    root and processes only its sibling nodes. It never descends
    below that layer to the child nodes below. Your code should
    have another loop to correct this.
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    null

  • How to increase the table space for a particular table?

    Hi Friends,
    I want to know how to increase the table space for a particular table and how to check the table space size of a particular table. Please can any one send the SQL Script. I am very much poor in DBA Part.
    Thanking You ..
    Kiran

    Kiran - you should post this question on the SQL/Database forums - this is a Forms specific forum...
    Regards
    Grant Ronald
    Forms PRoduct Management

  • I need the SPICE Model for DS1809 or the component in Multisim. Help mee!

    Hey people, I need the SPICE Model for DS1809 (Digital Potentiometer) for Multisim. Does anybody have this?? Or any idea where to get. I searched for, but I coudn't find.
    Thank you

    Hi,
    As you can see in this link the part is longer manufactured and it does not have a replacement.
    In terms of functionality, you can try using the component PLL_VIRTUAL in Multisim to replace it in a high level simulation or create a new component of a replacement that you have the SPICE model of.
    Let me know if you need any help.
    Mahmoud W
    National Instruments

  • I need the SPICE Model for MC145106 or the component in Multisim. Please

    I need the SPICE Model for MC145106 or the component in multiSIM. Please!

    Hi,
    As you can see in this link the part is longer manufactured and it does not have a replacement.
    In terms of functionality, you can try using the component PLL_VIRTUAL in Multisim to replace it in a high level simulation or create a new component of a replacement that you have the SPICE model of.
    Let me know if you need any help.
    Mahmoud W
    National Instruments

  • I have purchased Wedding Style By Miracle Design - it is showing in the downloads but I can not get it into lightroom - I am using a mac and the instructions are for windows.

    I have purchased Wedding Style By Miracle Design - it is showing in the downloads but I can not get it into lightroom - I am using a mac and the instructions are for windows.

    Return, cancel, or exchange an Adobe order

  • Can I use Other database as the repository, Sybase/SQL Server? Urgent!!!

    Hi all,
    Can I use Other database as the repository, Sybase/SQL Server? Urgent!!!
    And Can I use other database store business data and sync with lite?
    Thanks ahead!!!

    Jonathan,
    No, it is not possible to use any other database than Oracle (8.1.7) or later .
    Oracle Lite will only work with Oracle.
    Regards

  • Urgent please help: what is the table name for cash management reports?

    I am wondering what the table name for cash management reports is. I am trying to figure out then if I have any missing.
    Please help.

    I checked MSEG table. But, I didn't find any field for date.
    Can you tell me field name.
    Regards
    Siva

Maybe you are looking for

  • Best Practice on Dependencies

    We are new to Tidal (6.1)  and create jobs or jobgroup dependencies as: default is to use Match Occurrence Last Occurrence is only used for specific jobs that are demanded adhoc This gives us some problems when we manipulate jobs - suddenly we have n

  • I want to get rid of the alert box that keeps coming up that says the server at .... is taking too long to respond

    I would rather it just keep trying to connect rather than continuously pop that stinking box up. It's very annoying

  • Cash Flow: input accounts

    Hi guys, I'm working on the cash flow, and I have a couple of questions regarding some accounts that need to be calculated outside HFM. How do you usually handle this? Do you create an additional structure like "CF_Aux" to input there? If I need to c

  • My Id has been deactivated

    Hello guys. I have a problem with my id, it has been deactivated and i cannot buy on apple store or make any actualisation. Can somebody tell me what i ve to do to activate my Id again?Please.

  • Dynamically deleting a List Item

    i have a doubt as to can we dynamically delete a element in a List Item. I know, adding elements in a list but, can we delete it. I hope, my question is clear. Please help in solving the doubt. Regards.