30 day money-back guarantee
Read more...
9 EUR lifetime license
15 EUR lifetime license
(nofollow link from sponsors page)
| 23.1% | | United States | | 15.5% | | India | | 7.3% | | Russian Federation | | 7.1% | | Colombia | | 6.1% | | Germany | | 5.1% | | United Kingdom | | 4.4% | | Poland | | 3.5% | | Netherlands | | 3% | | France | | 2.9% | | Canada |
| Today: | 510 | | Yesterday: | 1586 | | This Week: | 2096 | | Last Week: | 10059 | | This Month: | 8795 | | Total: | 32109 | |
Users| Most active users today from total of 22: | | mlewis, matto, vsdileep, waseem, yosua.winata, plaginha, davoided, anewname1, mrits, Contestano, maryswave, NightOwl, artisan, dwlamb, vivacomputers, rottenberg, djunykasim, dlaurie, docklandassist, acrucesalus | |
JoomlaWatch is popular joomla visitor tracking and live stats component. It provides several features such as spam blocking,
goals tracking, charts, nightly email reports, latest visit map, interactive HTML5 traffic flow graph and many other useful functionalities,
which will help you to optimize your site.
Freelance
Projects
Forum
Resources
Notes from the Hibernate training. Basic information about hibernate configuration, mapping and queries
- architekt??ra - mapovanie (basic, collection, component, inheritance) - transakcie - ??e biznis vrstva je realizovan?? be??n??mi Java objektami (nie komponentami typu EJB). - polymorfick?? v??bery - aplikacne rozhranie produktu hibernate (?) - v??bery pod??a krit??ria - nat??vne v??bery - hibernate anot??cia - anot??cia pre vlastnosti entity bean EJB 3.0 - roz????ren?? anot??cia - pouzivanie cache mechanizmov - optimalizacia vykonavania databazovych pristupov - HAR ? - object databases - daju sa v ejb3 obist anotacie?
Rich object model, fine grain persistence model
- layer application pattern (made by layers)
scheme: ========== View Controll Bussiness layer Persistent layer Persistent store
- fine grain persistence model (doesn't hide details)
persistent layer: - low level layer (JDBC) - non object (SQL) - high level layer (transformation layer)
BPM (Bussiness process management) === - Service oriented architecture - !!! - BPL - language (transforms) - object timers
- BPEL (Buss. process execution language) - SOA (Service oriented architecture) - jBPM - jbosses implementation of SOA - BEA's implementation of SOA
SOA modelling ============= BPML | v Services | v Components (EJB/servlets) | v Persistence
Configuration:
Configuration object - universal
- configuration can be stored in universal configuration file ->
hibernate.properties in etc directory
- stored in CLASSPATH
or
hibernate.cfg.xml
JMX specification -> MBeans components, they have to manage applications, services etc.
hibernate can be a component - MBean in jboss, etc.
- there can be also some mapping information
-Dproperty = value (in start of virtual machine)
Configuration.setProperties()
- loading mapping of persistent classes (.xml)
- factory for SessionFactory object
SessionFactory - manager of db connections - represent cache of all objects - thread-safe object (one for every database) - configuration.buildSessionFactory() - sessionFactory.openSession() -> creates a session object (communication) - all activities regarding persistence - physical "cache" - can be switched off, 2nd level cache
Session object - represents usage of hibernate API - object that is not thread-safe - you cannot use it in many threads !! - represents first-level cache of objects - logical "cache" - short-time object, doesn't have to be used permanently - just for one communication mechanism
Transaction - wrapper for transactions
Mapping - specified by metadata (XML files)
Package =~ namespace one pojem is unique in a package
version 3: - class can be in two or more tables
- test first design, extreme programming ! - mock objects - technology of testing within object - separating algorithms to different classes - exchanging class to which interface ukazuje for a test class - you can test functionality this way
- "database last" - methodology ! you programm database last.. instead of that there are dummy objects - Dummy objects -> by database last, for client - fictive objects, implemented by constants - testing !!! - you can have visual functional application by dummy objects - "don't talk to strangers" design pattern - CRUD (create, restore, update, delete) - transient, persistent, detached states of hibernated objects - detached object in hibernate !!!
mapping attributes:
- access = "field" (because of not using set/get methods, slower.. reflection) - access = "property" (default) - immutable = not modified in insert or update (computing functions), read only
- detached object = if the session is closed, object is then standalone
- session.evict - explicit signal for session to stop caching of an object
Queries: - HQL - hibernate query language - Query by Criteria - type-safe way for query, you will fill an object which are then criteria - Query by Examples - or Native SQL
Criteria objects
- specifying query by criteria
session.createCriteria(Zakaznik.class) .add(Expression.eq("meno","Jano")) .add(Expression.qt("id",new Long(2))) .list();
- gt (greater than...)
Partial objects
- just in toplink, not hibernate
Report query
- you can aggregate objects - HQL
Mapping of inheritance
- adds discriminator for entity type
Bidirectional association - inverse = "true"
- one side is slave and one is master
Cascade save-update
- will save all referenced asssociated objects
cascade delete - will delete all referenced asssociated objects
- cascade all
Cache mechanisms
- physical and logical cache - evict - flush out cache - max cache size - JProfiler ! - tool for monitoring JVM, objects, memory space, etc.
{} - native select
|
Add comment
|