• Stars
    star
    3
  • Rank 3,951,355 (Top 78 %)
  • Language
    Java
  • License
    Eclipse Public Li...
  • Created almost 7 years ago
  • Updated almost 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Once an object is saved in a database, we can modify that object any number of times right, If we want to know how many no of times that an object is modified then we need to apply this versioning concept. When ever we use versioning then hibernate inserts version number as zero, when ever object is saved for the first time in the database. Later hibernate increments that version no by one automatically when ever a modification is done on that particular object. In order to use this versioning concept, we need the following two changes in our application Add one property of type int in our pojo class In hibernate mapping file, add an element called version soon after id element

More Repositories

1

Sample-Hibernate-Code

save, update,delete,SaveOrUpdate,Get
Java
5
star
2

JDBC_Operations

Insert, Update, Delete,Create Table
4
star
3

Spring_SpringORM_Save_Update_Delete_Get_LoadAll_Maven

Add hibernate 3.x jars, Spring 3.x jars, common logggins jars, ojdbc6.jar or ojdbc14 jar
Java
4
star
4

Hibernate_Pagination_With_Servlet_JSP_Maven

when response for request is too large [If we have 1000’s of records in the database] then instead of displaying all records at a time on browser we can display the response page by page manner using pagination mechanism
Java
4
star
5

Spring_Scopes_Singleton_Prototype

Java
4
star
6

Hibernate_HQL_Select_Queries_Specific

Hibernate Query Language (HQL) is same as SQL (Structured Query Language) but it doesn't depends on the table of the database. Instead of table name, we use class name in HQL. So it is database independent query language. #Query Interface It is an object oriented representation of Hibernate Query. The object of Query can be obtained by calling the createQuery() method Session interface. The query interface provides many methods. There is given commonly used methods: public int executeUpdate() is used to execute the update or delete query. public List list() returns the result of the ralation as a list. public Query setFirstResult(int rowno) specifies the row number from where record will be retrieved. public Query setMaxResult(int rowno) specifies the no. of records to be retrieved from the relation (table). public Query setParameter(int position, Object value) it sets the value to the JDBC style query parameter. public Query setParameter(String name, Object value) it sets the value to a named query parameter.
Java
4
star
7

Servlet_File_Downloading

Java
4
star
8

Hibernate_custom_random_generator_Maven

We need a Hibernate identifier generator that can take any value that we manually assign, and it can also automatically generate a unique identifier when the entity identifier is null. However, the user does not want to use a UUID-like random identifier. Instead, the user needs to generate a String value that combines a prefix and a numerical value that is obtained from a database sequence.
Java
4
star
9

Hibernate_Native_Generator_XML

Native means Your generator will use identity or sequence columns according to what your current database support. Native: This generation strategy is the default. It simply chooses the primary key generation strategy that is the default for the database in question, which quite typically is IDENTITY, although it might be TABLE or SEQUENCE depending upon how the database is configured. The native strategy is typically recommended, as it makes your code and your applications most portable.
Java
4
star
10

Hibernate_HQL_UniqueResult_ExecuteUpdate_CopyData_Delete_Update

Don't use 'Query.list()' when you really need 'Query.uniqueResult()' in Hibernate.
Java
3
star
11

Spring_Dependency_Check_annotation

Java
3
star
12

Spring_ORM_Java_Configuration

Java
3
star
13

Hibernate_Native_SQL_Scalar_Using_DAO_Using_MAVEN

The most basic SQL query is to get a list of scalars (values) from one or more tables.
Java
3
star
14

Spring_Constructor_Injection_Constructor_arg

Java
3
star
15

Spring_Standalone_Application

Java
3
star
16

Spring_Autowiring_XML_byType_byName_Constructor

Java
3
star
17

Hibernate_increment_generator

increment keeps track of id in jvm and increments it within process.
Java
3
star
18

Spring_Scope_LookupMethod

Java
3
star
19

Hibernate_Native_SQL_Using_DAO_Using_MAVEN

Java
3
star
20

Documentations

Steps for Different Software Installation
3
star
21

Spring_Autowiring_Annotation_OneMatch_MultipleMatch_Qualifier

Java
3
star
22

JDBC_LargeObjects_BLOB_PSTMT

Java
3
star
23

Spring_Reference

In Spring we need to use <ref> element to inform spring container about the object dependency.
Java
3
star
24

Hibernate_ONE-TO-ONE_Mappings_Annotation_Save_Maven

The @OneToOne annotation is used to create the one-to-one relationship between childs and parent. A one-to-one association is similar to many-to-one association with a difference that the column will be set as unique. For example, an address object can be associated with a single employee object.
Java
3
star
25

Hibernate_SEQ_HILO_Generator_XML

uses a hi/lo algorithm to efficiently generate identifiers of type long, short or int, given a named database sequence.
Java
3
star
26

Servlet_ServletAnnotations_Servlet_JSP

Servlet API 3.0 has introduced a new package called javax.servlet.annotation. It provides annotation types which can be used for annotating a servlet class. If you use annotation, then the deployment descriptor (web.xml) is not required. But you should use tomcat7 or any later version of tomcat. Annotations can replace equivalent XML configuration in the web deployment descriptor file (web.xml) such as servlet declaration and servlet mapping. Servlet containers will process the annotated classes at deployment time.
Java
3
star
27

Hibernate_HQL_Select_Queries

Hibernate Query Language (HQL) is same as SQL (Structured Query Language) but it doesn't depends on the table of the database. Instead of table name, we use class name in HQL. So it is database independent query language.
Java
3
star
28

Servlet_FileUploading

A Servlet can be used with an HTML form tag to allow users to upload files to the server. An uploaded file could be a text file or image file or any document.
Java
3
star
29

Hibernate-_Many-to-Many_Mappings_XML_Save_Load_Maven

A Many-to-Many mapping can be implemented using a Set java collection that does not contain any duplicate element. We already have seen how to map Set collection in hibernate, so if you already learned Set mapping, then you are all set to go with manyto-many mapping. A Set is mapped with a <set> element in the mapping table and initialized with java.util.HashSet. You can use Set collection in your class when there is no duplicate element required in the collection.
Java
3
star
30

Spring_Java_Configuration

The central artifact in Spring's new Java-configuration support is the @Configuration-annotated class. These classes consist principally of @Bean-annotated methods that define instantiation, configuration, and initialization logic for objects that are managed by the Spring IoC container. Annotating a class with the @Configuration indicates that the class can be used by the Spring IoC container as a source of bean definitions. An application may use one @Configuration-annotated class, or many. @Configuration is meta-annotated as a @Component. Therefore, @Configuration-annotated classes are candidates for component-scanning and can also take advantage of @Autowired annotations at the field and method levels, but not at the constructor level. @Configuration-annotated classes must also have a default constructor. You can wire externalized values into @Configuration-annotated classes with the @Value annotation.
Java
3
star
31

Servlet_HttpServlet

HttpServlet class HttpServlet class Methods of HttpServlet class The HttpServlet class extends the GenericServlet class and implements Serializable interface. It provides http specific methods such as doGet, doPost, doHead, doTrace etc.
Java
3
star
32

Servlet_SendRedirect

The sendRedirect() method of HttpServletResponse interface can be used to redirect response to another resource, it may be servlet, jsp or html file. It accepts relative as well as absolute URL. It works at client side because it uses the url bar of the browser to make another request. So, it can work inside and outside the server.
Java
3
star
33

Servlet_GenericServlet

GenericServlet class implements Servlet, ServletConfig and Serializable interfaces. It provides the implementation of all the methods of these interfaces except the service method. GenericServlet class can handle any type of request so it is protocol-independent. You may create a generic servlet by inheriting the GenericServlet class and providing the implementation of the service method.
Java
3
star
34

Hibernate_UUID_Generator_XML

Most developers prefer numerical primary keys because they are efficient to use and easy to generate. But that doesn’t mean that a primary key has to be a number. UUIDs, for example, have gained some popularity over the recent years. The main advantage of a UUID is its (practical) global uniqueness which provides a huge advantage for distributed systems. If you use the typical, numerical ID that gets incremented for each new record, you need to generate all IDs by the same component of your system or the components need to communicate with each other. With a globally unique UUID, you don’t need all of this. Each component can generate a UUID and there will not be any conflicts.
Java
3
star
35

Spring_JDBC_Maven_Save_Update_Delete

Spring JdbcTemplate is a powerful mechanism to connect to the database and execute SQL queries. It internally uses JDBC api, but eliminates a lot of problems of JDBC API.
Java
2
star
36

Hibernate_Sequence_Generator_XML

Java
2
star
37

Hibernate_Native_SQL_Maven_Annotation

Java
2
star
38

Hibernate_Association_Mapping_MAP_OneToMany_Save_Delete_Maven

Java
2
star
39

Hibernate_Sequence_Generator_Annotation

It uses the sequence of the database. if there is no sequence defined, it creates a sequence automatically e.g. in case of Oracle database, it creates a sequence named HIBERNATE_SEQUENCE. In case of Oracle, DB2, SAP DB, Postgre SQL or McKoi, it uses sequence but it uses generator in interbase.
Java
2
star
40

Hibernate_Association_Mapping_ManyToOne_Save_Load_Maven

Java
2
star
41

Hibernate_ComponentMapping_DAO_ManyToMany_Annotations

Java
2
star
42

Hibernate_Pagination_Using_Servlet_html_Maven_Save

Java
2
star
43

Spring_ORM_Hibernate_save

Java
2
star
44

Hibernate_Association_Mapping_BAG_OneToMany_Save_Delete

Java
2
star
45

Servlet_Context_Interface

An object of ServletContext is created by the web container at time of deploying the project. This object can be used to get configuration information from web.xml file. There is only one ServletContext object per web application. If any information is shared to many servlet, it is better to provide it from the web.xml file using the <context-param> element.
Java
2
star
46

JDBC_PREPARED_STATEMENT

The PreparedStatement interface is a subinterface of Statement. It is used to execute parameterized query.
2
star
47

Servlet_ServletAttributeListener_Added_Replaced_Removed

Java
2
star
48

Spring_Simple_Spring

Spring Framework
Java
2
star
49

DATABASE-CONNECTIVITY

Java
2
star
50

Hibernate-_Many-to-Many_Mappings_IDBAG_XML_Save_Maven

Hibernate's <idbag> facility allows you to map many-to-many associations and collections of values to a single table with a surrogate key
Java
2
star
51

Hibernate_Association_Mapping_List_OneToMany_Save_Maven

Java
2
star
52

Hibernate_Association_Mapping_BAG_OneToMany_Save_Delete_Maven

Java
2
star
53

Hibernate_Test

Simple Hibernate project with configuration,mapping files with domain/entity class
Java
2
star
54

Hibernate_Association_Mapping_Maven_Set_OneToMany_Save_

Java
2
star
55

Spring_Jdbc_Using-Java_Configuration

Java-based configuration option enables you to write most of your Spring configuration without XML but with the help of few Java-based annotations explained in this chapter. @Configuration & @Bean Annotations Annotating a class with the @Configuration indicates that the class can be used by the Spring IoC container as a source of bean definitions. The @Bean annotation tells Spring that a method annotated with @Bean will return an object that should be registered as a bean in the Spring application context.
Java
2
star
56

Spring_Life_Cycle_Init_Destroy_Using_Annotation

You can define initialization and destroy methods with in the spring bean. You can configure it using init-method, and destroy-method in the xml based configuration file. These are part of spring bean life cycle. The initialization method will be called immediately after bean creation, and destroy method will be called before killing the bean instance
Java
2
star
57

Servlet_Filters

A filter is an object that is invoked at the preprocessing and postprocessing of a request. It is mainly used to perform filtering tasks such as conversion, logging, compression, encryption and decryption, input validation etc. The servlet filter is pluggable, i.e. its entry is defined in the web.xml file, if we remove the entry of filter from the web.xml file, filter will be removed automatically and we don't need to change the servlet.
Java
2
star
58

Hibernate_CustomGenerator_Custom_StringType_Id_Generation

Java
2
star
59

Spring_Core_InnerBean

Java inner classes are defined within the scope of other classes, similarly, inner beans are beans that are defined within the scope of another bean. Thus, a <bean/> element inside the <property/> or <constructor-arg/> elements is called inner bean
Java
2
star
60

Hibernate_Inheritance_Mapping_Table_Per_Class_Hierarchy_Using_DAO_Using_Maven

Hibernate Inheritance Mapping Tutorial Table Per Hierarchy Table Per Concrete class Table Per Subclass We can map the inheritance hierarchy classes with the table of the database. There are three inheritance mapping strategies defined in the hibernate: 1.Table Per Hierarchy 2.Table Per Concrete class 3.Table Per Subclass
Java
2
star
61

Servlet_Applet_Communication

Similar to HTML-to-servlet communication we need to perform applet-to servlet communication. In HTML-to-servlet communication the browser window automatically forms request URL and automatically forms query string having form data, when submit button is clicked. In applet-to-servlet communication all these activities should be taken care of by the programmers manually or explicitly as event handling operation.
Java
2
star
62

Hibernate_Component_Mapping_Using_DAO_Using_Maven

Hibernate - Component Mappings---> In component mapping, we will map the dependent object as a component. An component is an object that is stored as an value rather than entity reference. This is mainly used if the dependent object doen't have primary key. It is used in case of composition (HAS-A relation), that is why it is termed as component.
Java
2
star
63

Servlet_RequestDispatcher_Forward_WebLogic_Server

To forward the client request to another Servlet to honour (that is, client calls a Servlet but response to client is given by another Servlet). RequestDispatcher forward() Method When to use RequestDispatcher forward() method? Client calls a Servlet for some information. But the Servlet cannot honour the request because it is incapable. But it knows that another Servlet exists which can do the job of the client. Then how the first Servlet (called by the client) can send (forward) the request to another Servlet. Here, forward() method of RequestDispatcher is used. void forward(ServletRequest request, ServletResponse response) throws ServletException, IOException: Forwards a request from a Servlet to another resource (Servlet, JSP file, or HTML file) on the server. This method allows one Servlet to do preliminary processing of a request and another resource to generate the response.
Java
2
star
64

Servlet_Config_Interface

ServletConfig Interface An object of ServletConfig is created by the web container for each servlet. This object can be used to get configuration information from web.xml file. If the configuration information is modified from the web.xml file, we don't need to change the servlet. So it is easier to manage the web application if any specific content is modified from time to time.
Java
2
star
65

JDBC_SCROLLABLE_RESULTSET

By default a ResultSet Interface is Non-Scrollable, In non-scrollable ResultSet we can move only in forward direction (that means from first record to last record), but not in Backward Direction, If you want to move in backward direction use Scrollable Interface.
2
star
66

Hibernate_Service_Registry_BootStrapping

Service : Services are classes that provide Hibernate with pluggable implementations of various types of functionality. Specifically they are implementations of certain service contract interfaces ServiceRegistry : The central service API, aside from the services themselves, is the org.hibernate.service.ServiceRegistry interface. The main purpose of a service registry is to hold, manage and provide access to services.
Java
2
star
67

Hibernate_Inheritance_Mapping_Table_Per_Sub_Class_XML_Using_DAO_Using_Maven

In case of Table Per Subclass, subclass mapped tables are related to parent class mapped table by primary key and foreign key relationship. The <joined-subclass> element of class is used to map the child class with parent using the primary key and foreign key relation. In this example, we are going to use hb2ddl.auto property to generate the table automatically. So we don't need to be worried about creating tables in the database.
Java
2
star
68

Servlet_GenericServlet_Date

GenericServlet class implements Servlet, ServletConfig and Serializable interfaces. It provides the implementation of all the methods of these interfaces except the service method. GenericServlet class can handle any type of request so it is protocol-independent. You may create a generic servlet by inheriting the GenericServlet class and providing the implementation of the service method.
Java
2
star
69

Servlet_RequestDispatcher_Include_WebLogic_Server

The RequestDispatcher interface provides the facility of dispatching the request to another resource it may be html, servlet or jsp. This interface can also be used to include the content of another resource also. It is one of the way of servlet collaboration.
Java
2
star
70

Hibernate-_Many-to-Many_Mappings_Annotation_Save_Load_Maven

A Many-to-Many mapping can be implemented using a Set java collection that does not contain any duplicate element. We already have seen how to map Set collection in hibernate, so if you already learned Set mapping, then you are all set to go with manyto-many mapping. A Set is mapped with a <set> element in the mapping table and initialized with java.util.HashSet. You can use Set collection in your class when there is no duplicate element required in the collection.
Java
2
star
71

JSP_Servlet_Include_Page_Directive

The include directive is used to include the contents of any resource it may be jsp file, html file or text file. The include directive includes the original content of the included resource at page translation time (the jsp page is translated only once so it will be better to include static resource).
Java
2
star
72

Hibernate_Pagination_HQL_Maven_Simple

when response for request is too large [If we have 1000’s of records in the database] then instead of displaying all records at a time on browser we can display the response page by page manner using pagination mechanism In pagination, initially one page response will be displayed and we will get links for getting the next pages response
Java
2
star
73

JBOSS_Sample_Servlet

JBoss is a division of Red Hat that provides support for the WildFly open source application server program (formerly called JBoss AS) and related middleware services. JBoss is an open source alternative to commercial offerings from IBM WebSphere and SAP NetWeaver.
Java
2
star
74

Hibernate_Inheritance_Mapping_concreteClass_UnionSubClassDAO_Maven

In case of Table Per Concrete class, there will be three tables in the database having no relations to each other. There are two ways to map the table with table per concrete class strategy. By union-subclass element By Self creating the table for each class
Java
2
star
75

Spring_Life_Cycle_Init_Destroy_Using_XML

You can define initialization and destroy methods with in the spring bean. You can configure it using init-method, and destroy-method in the xml based configuration file. These are part of spring bean life cycle. The initialization method will be called immediately after bean creation, and destroy method will be called before killing the bean instance
Java
2
star
76

Hibernate_Criteria_Queries_Using_DAO_Using_MAVEN

Hibernate provides alternate ways of manipulating objects and in turn data available in RDBMS tables. One of the methods is Criteria API, which allows you to build up a criteria query object programmatically where you can apply filtration rules and logical conditions. The Hibernate Session interface provides createCriteria() method, which can be used to create a Criteria object that returns instances of the persistence object's class when your application executes a criteria query. Following is the simplest example of a criteria query is one, which will simply return every object that corresponds to the Employee class. Criteria cr = session.createCriteria(Employee.class); List results = cr.list(); Restrictions with Criteria You can use add() method available for Criteria object to add restriction for a criteria query. Following is the example to add a restriction to return the records with salary is equal to 2000 βˆ’ Criteria cr = session.createCriteria(Employee.class); cr.add(Restrictions.eq("salary", 2000)); List results = cr.list();
Java
2
star
77

Spring_Static_Factory_Method

next →← prev Dependency Injection with Factory Method in Spring Spring framework provides facility to inject bean using factory method. To do so, we can use two attributes of bean element. factory-method: represents the factory method that will be invoked to inject the bean. factory-bean: represents the reference of the bean by which factory method will be invoked. It is used if factory method is non-static. A method that returns instance of a class is called factory method.
Java
2
star
78

Servlet_ServletRequestListener_NoOfClicksCount

Events are basically occurance of something. Changing the state of an object is known as an event. We can perform some important tasks at the occurance of these exceptions, such as counting total and current logged-in users, creating tables of the database at time of deploying the project, creating database connection object etc. There are many Event classes and Listener interfaces in the javax.servlet and javax.servlet.http packages. Event classes The event classes are as follows: ServletRequestEvent ServletContextEvent ServletRequestAttributeEvent ServletContextAttributeEvent HttpSessionEvent HttpSessionBindingEvent Event interfaces The event interfaces are as follows: ServletRequestListener ServletRequestAttributeListener ServletContextListener ServletContextAttributeListener HttpSessionListener HttpSessionAttributeListener HttpSessionBindingListener HttpSessionActivationListener
Java
2
star
79

Hibernate_Association_Mapping_Maven_Set_OneToMany_ManyToOne_Bidirection_Save_Load

Java
1
star
80

Hibernate_Composite_Primary_Key_MAVEN_Annotation

To map a composite key, you can use the EmbeddedId or the IdClass annotations.
Java
1
star
81

Hibernate_Association_Mapping_Maven_Set_OneToMany_FK_PK_Save_Load

Java
1
star
82

Servlet_Forward_Mechanism_DAO_DTO_ConnectionFactory_Entity_WebLogic_Server

Java
1
star
83

Spring_Stereotype_Annotation_Value_Maven

Pass the value to the variables through @Value Annotation. Annotation Used @Component, @Value, @Autowired
Java
1
star
84

Connection_Commit_Rollback

If your JDBC Connection is in auto-commit mode, which it is by default, then every SQL statement is committed to the database upon its completion.
1
star
85

Hibernate_Unique_Constraint_Annotation

UniqueConstraint Specifies that a unique constraint is to be included in the generated DDL for a primary or secondary table.
Java
1
star
86

Spring_Stereotype_Annotation

@Component Indicates that an annotated class is a "component". Such classes are considered as candidates for auto-detection when using annotation-based configuration and classpath scanning. Other class-level annotations may be considered as identifying a component as well, typically a special kind of component
Java
1
star
87

Spring_reference_tag

In Spring, beans can β€œaccess” to each other by specify the bean references in the same or different bean configuration file. Actually, the β€˜ref’ tag can access to a bean either in same or different XML files, however, for the project readability, you should use the β€˜local’ attribute if you reference to a bean which declared in the same XML file.
Java
1
star
88

Hibernate_Validation_API_Annotation_Simple

It’s very easy to use Hibernate Validator and best part is that we can easily extend it and create our own custom validation annotations. Today we will look into the hibernate validator in detail with examples. Finally we will have a test program to check out the validations.
Java
1
star
89

Hibernate_Large_Objects_Maven_BLOB_CLOB

This tutorial shows you how to map byte array (byte[]) or Binary Large Object (java.sql.Blob) of Java type to database type using Hibernate ORM framework. Byte array or Blob can be used to store large binary data such as files and images. According to Hibernate Types: A primitive byte[] is mapped to a JDBC VARBINARY. A java.sql.Blob is mapped to a JDBC BLOB.
Java
1
star
90

Hibernate_Date_Annotation

When you save date to the database using hibernate, the date is converted to local time and stored. Suppose your date is '12-08-2017' ,hibernate inserts it into database in default format of"yyyy-mm-dd". Timestamp format is yyyy-mm-dd hh:mm:ss. Timestamp format takes 4 byte whereas DtaeTimeFormat takes 8 byte. Hibernate provides date type annotation which takes format 'yyyy-mm-dd'
Java
1
star
91

Servlet_ServletWrappers

Wrappers are required because the current implementation of the interface is container specific and hence you cannot extend them. However you can extend the wrappers and override only those methods that are required to be changed. The remaining method calls will be delegated to the container implementation. You may also implement the interfaces from scratch on your own, but that would be a very difficult and time consuming task.
Java
1
star
92

Spring_Bean_Externalization_propertiesFile

In case of XML, simply create bean for PropertyPlaceholderConfigurer and set the location of property file to externalize. In case of annotation, we need to create static bean of PropertyPlaceholderConfigurer in java configuration. PropertyPlaceholderConfigurer is used to resolve ${...} placeholders against a property. It can be local properties or system properties or environment variables. We can use PropertyPlaceholderConfigurer using XML as well as annotation. PropertyPlaceholderConfigurer externalizes the property configuration. Setting hard coded property values in our code is not good coding style. Properties should be configured in a property file inside or outside application. So that changing properties frequently will not cause to change the code.
Java
1
star
93

Servlet_ServletSecurity_Authentication_JSP

JavaServer Pages and servlets make several mechanisms available to Web developers to secure applications. Resources are protected declaratively by identifying them in the application deployment descriptor and assigning a role to them. Several levels of authentication are available, ranging from basic authentication using identifiers and passwords to sophisticated authentication using certificates. Role Based Authentication The authentication mechanism in the servlet specification uses a technique called role-based security. The idea is that rather than restricting resources at the user level, you create roles and restrict the resources by role. You can define different roles in file tomcat-users.xml, which is located off Tomcat's home directory in conf
Java
1
star
94

JDBC_RESULTSET

The SQL statements that read data from a database query, return the data in a result set. The SELECT statement is the standard way to select rows from a database and view them in a result set. The java.sql.ResultSet interface represents the result set of a database query. A ResultSet object maintains a cursor that points to the current row in the result set. The term "result set" refers to the row and column data contained in a ResultSet object.
Java
1
star
95

Spring_Constructor_Injection_C_Schema

Java
1
star
96

Spring_Java_Configuration_HAS-A

Java-based configuration option enables you to write most of your Spring configuration without XML but with the help of few Java-based annotations explained in this chapter. @Configuration & @Bean Annotations Annotating a class with the @Configuration indicates that the class can be used by the Spring IoC container as a source of bean definitions. The @Bean annotation tells Spring that a method annotated with @Bean will return an object that should be registered as a bean in the Spring application context.
Java
1
star
97

Hibernate_Inheritance_Mapping_concreteClass_UnionSubClassDAO_Implicit_Polymorphism_Maven

Java
1
star
98

Hibernate_Association_Mapping_Joins_Set_OneToMany_ManyToOne_Bi_Inner_Left_Right

We use join statements, to select the data from multiple tables of the database, when there exist relationship with joins, its possible to select data from multiple tables of the database by construction a single query Hibernate supports 4 types of joins.. Left Join Right Join Full Join Inner Join the DEFAULT join in hibernate is Inner join Left join means, the objects from both sides of the join are selected and more objects from left side are selected, even though no equal objects are there at right side Right join means equal objects are selected from database and more objects are from right side of join are selected even though there is no equal objects are exist left side Full join means, both equal and un-equal objects from both sides of join are selected Inner join means only equal objects are selected and the remaining are discarded At the time of construction the join statements, we need to use the properties created in pojo class to apply relationship between the objects To construct a join statement, we use either HQL, or NativeSql
Java
1
star