Getting Started with Hibernate (4) - Query

1. Hibernate Query 1. Classification of Hibernate retrieval methods OID retrieval: based on primary key query, get/load Object Navigation Retrieval: Get its associated objects from one object. [Key] Category category = session.get(Category.class, 1);Set<Product> products = category.getProducts(); HQL Retrieval: HQL,Hibernate Query ...

Posted by wrwilson on Wed, 15 May 2019 18:28:06 -0700

Android System Log Write File

Catalogue introduction 1. Business requirements 2. What are the current practices and problems? 3. Customize log Tool Class, Print log and Write Files 4. Open thread pool in application for log printing 5. Write a service to write system logs to files About links 1.Technology Blog Summary 2.Summary of Open Source Projects 3.Summary of Life ...

Posted by ok on Wed, 15 May 2019 05:24:52 -0700

springdata Learning Log

SpringData JPA springdata Learning Log--day1 1. Basic introduction of Spring-data-jpa 2. Integration with Spring 3. Usage and details springdata Learning Log - day1 1. Basic introduction of Spring-data-jpa spring-data jpa represents the integration with jpa, and hibernate implementation standard is provided by JPA ( ...

Posted by skymanj on Tue, 14 May 2019 07:19:20 -0700

Detailed Explanation of Spring Transaction Implementation Principle

Above( Tangent Analysis of Spring Transactions ) In this article, we explain how Spring determines whether the target method needs to weave into aspect logic, which explains that transaction logic is woven through Transaction Interceptor. This article mainly explains how Transaction Interceptor weaves into aspect logic. 1. Global Transaction Lo ...

Posted by LucienFB on Sat, 11 May 2019 17:02:18 -0700

spring annotation validation @NotNull and other usage methods

Commonly used labels @ Null annotated element must be null @ NotNull annotated element cannot be null @ The annotated element of AssertTrue must be true @ AssertFalse annotated elements must be false @ The annotated element of Min(value) must be a number whose value must be greater than or equal to the specified minimum. @ ...

Posted by rostislav on Fri, 10 May 2019 13:13:35 -0700

SSH Integration Mode I

SSH Integration (Struts 2 + Spring + Hibernate) SSH integration, Struts 2 as the web layer, Spring as the business layer, Hibernate as the persistence layer, the situation is roughly illustrated as follows: 1. Import the Jar package The first step in integration is to create a web project and import the jar packages require ...

Posted by numan82 on Wed, 24 Apr 2019 15:24:35 -0700

Hibernate Framework Note 03_Table Operation_Multiple-to-Multiple Configuration

Hibernate Framework Note 03_Table Operation_Multiple-to-Multiple Configuration Article directory Hibernate Framework Note 03_Table Operation_Multiple-to-Multiple Configuration 1. Relationships between database tables and tables 1.1 One-to-many relationship 1.2 Many-to-Many Relations 1.3 One-to-one relationship [understandi ...

Posted by Mel on Wed, 24 Apr 2019 11:39:35 -0700

Hibernate Framework Note 02_Primary Key Generation Policy_Level 1 Cache_Transaction Management

0. structure diagram 1. Writing rules for persistent classes 1.1 Persistence and Persistence Classes Persistence: The process of persisting an object in memory to a database. The Hibernate framework is the framework for persistence. Persistence class: A Java object maps to a database table, so this class is called a persistence class in Hiber ...

Posted by j1bird2k on Tue, 23 Apr 2019 18:27:35 -0700

Hibernate Framework Notes 01_Environment Build_API_CRUD

1. Overview of Hibernate Framework 1.1 What is a Framework Framework: refers to the semi-finished software, has completed some functions. 1.2 Classic Three-tier Architecture 1.3 Hibernate Framework What is hibernate: Hibernate is a persistent ORM framework What is ORM: Object Relational Mapping (Object Relational ...

Posted by nadnad on Mon, 22 Apr 2019 17:51:35 -0700

hibernate map Simply Implements One-to-Many Relational Mapping

First of all, there are two tables of students (1) scores (more), which require hibernate relational mapping (xml) to establish one-to-many relationship between them. And use map to update students'grades First, establish the entity class Student.java package entities; import java.util.Date; import java.util.HashMap; import java.u ...

Posted by nezona on Sun, 21 Apr 2019 17:27:34 -0700