Spider's web

…share your own experience

Main menu

Skip to primary content
Skip to secondary content
  • About Me
  • ABAP
    • ALV tutorial
    • Design patterns
    • SAP Enhancement Framework
    • Test Driven Development
  • Java
  • Algorithms
  • Linux

Category Archives: Database

Java – Map ResultSet to Object dynamically

Posted on 2014-01-14 by Spider
2

JavaDid you ever wanted  to implement simple mapping of database tables to java objects (models) and you wanted to do the whole stuff dynamically? I managed to put some code together which does exactly what you wanted Continue reading →

Share it with your friends:

  • Print
  • Email
  • Tweet
  • More
  • Share on Tumblr
  • Pocket
Posted in Database, Development, Java | Tagged annotation, database, getAnnotation, getDeclaredFields, isAnnotationPresent, reflection, ResultSet, ResultSetMetaData, setProperty | 2 Replies

Java – Build model from an instance of ResultSet

Posted on 2014-01-14 by Spider
Reply

JavaIf you want to display a JTable that displays data from a DataBase ResultSet you can do it manually using JTable that displays data converted from database table ResultSet into Object [ ][ ].
Another approach is to build the JTable model dynamically using the ResultSet meta data. In this article you can see an example of how this can be achieved. Continue reading →

Share it with your friends:

  • Print
  • Email
  • Tweet
  • More
  • Share on Tumblr
  • Pocket
Posted in Database, Development, Java | Tagged database, DefaultTableModel, MySQL, ResultSet, ResultSetMetaData | Leave a reply

Quote

  • That which does not kill us makes us stronger Friedrich Nietzsche
View Miroslav Oprštěný's profile on LinkedIn
Please contribute to the operation and development of this website

Recent posts

  • ABAP – Get fixed values of a domain
  • ABAP – Get all sub-classes of a super-class
  • ABAP – Find out TCode for SPRO activity
  • ABAP – Get max value of variable type as PACKED number
  • ABAP – How to find out if a BAPI is used in BOR

Categories

  • Design Patterns (9)
    • Behavioral patterns (2)
    • Creational patterns (5)
  • Development (144)
    • ABAP (117)
      • ALV (16)
      • ALV tutorial (16)
      • APO (1)
      • CRM (1)
      • Customizing (17)
      • Dynpro (20)
      • IDOC (1)
      • SRM (1)
      • Transactions (2)
      • WebDynpro (2)
      • Wokflow (2)
    • Algorithms (19)
    • C# (1)
    • C++ (8)
    • Database (2)
    • HTML & CSS (1)
    • Java (8)
    • Perl (3)
    • Python (1)
    • Ruby (1)
  • SAP (16)
    • Finance (4)
    • Inventory Management (1)
    • Materials Management (5)
    • Sales & Distribution (4)
    • Warehouse Management (1)
  • Tools (35)
    • Infrastructure (18)
    • Linux (13)
    • Networking (5)
    • Software (12)
  • Uncategorized (7)

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
Proudly powered by WordPress
 

Loading Comments...