Tài liệu Grails Persistence with GORM and GSQL

Thảo luận trong 'Căn Bản' bắt đầu bởi Thúy Viết Bài, 5/12/13.

  1. Thúy Viết Bài

    Thành viên vàng

    Bài viết:
    198,891
    Được thích:
    167
    Điểm thành tích:
    0
    Xu:
    0Xu
    Chapter 1: Defining the Model in GORM 1
    The Goal of GORM .1
    Defining Objects in GORM 2
    Creating and Defining Simple Domain Classes 2
    Creating and Defining Inheritance Trees 6
    Adding Functionality to One Domain Class . 10
    Adding Functionality to Multiple Domain Classes . 21
    Creating Domain Classes Within Packages 30
    Defining Relationships Between Classes 31
    Defining Tree Relationships 46
    Intermediaries and Has-Many-Through Relationships . 47
    Constructing New Instances .50
    Setting Basic Properties via Map Constructor 51
    Setting Relationship Properties via Map Constructor . 52
    Chapter 2: Customizing GORM Mapping
    and Enforcing Data Integrity 55
    Data Integrity Through Constraints 55
    Specifying Constraints 55
    Built-In Data Constraints .56
    Custom Constraints .61
    Customizing the Object/Relational Mapping .66
    Custom and Escaped Table Names . 66
    Customizing Properties . 67
    Customizing the Identity Column . 71
    Using Natural Identity . 73
    Customizing Relationship Links . 75
    Custom Association Fetching Strategies . 77
    The Second-Level Cache . 78
    Mapping Inheritance and Table-Per-Subclass Inheritance . 80
    Disabling Optimistic Locking . 81
    Demystifying Cascades .81
    Chapter 3: Querying with GORM and HQL .85
    Querying via Direct Methods on GORM Classes 85
    get 85
    lock . 89
    list . 89
    listOrderBy* 93
    findBy*/findAllBy* 94
    Querying via the Criteria Builder .99
    Querying Properties . 100
    Conjunctions (and/or) . 104
    Negation (not) . 106
    Paginated Results (maxResults/firstResult/order) 107
    Querying Relationships . 108
    Querying for Limited Data and Summaries (projections) 112
    Explicit Methods (list/listDistinct/get/scroll) 117
    Querying via the Hibernate Query Language (HQL) .119
    The Basics of HQL and executeQuery . 119
    Fully-Qualified Classes . 121
    Retrieving Only Particular Fields with Projections 122
    Associations and Joins in HQL . 123
    Retrieving Maps, Lists, and Objects Inline from HQL . 125
    Chapter 4: GORM Usage in Grails . 129
    Constructing GORM Objects in the Controller .129
    Working with Error Messages 132
    Lazy Initialization and the Grails Session .134
    Lazy Initialization and Open Session in View .136
    The Scenario: Accessing GORM from the View 136
    The Solution: Open Session in View Filter . 137
    Customizing and Tuning Grails Data Source Defaults 137
    Chapter 5: Filling in the Gaps with Groovy SQL and Spring’s JDBC Support . 141
    Groovy SQL in Grails .141
    The Role of Groovy SQL in Grails . 141
    Groovy SQL Basics . 141
    Injecting Groovy Sql Objects via Spring 143
    Using Groovy Sql Objects with GORM Transactions 145
    Spring’s JDBC Support in Grails .146
    The Role of Spring JDBC Support in Grails . 146
    Using Groovy to Concisely Implement Spring JDBC Support 146
    Injecting Spring JDBC Support Beans 147
     

    Các file đính kèm:

Đang tải...
Chủ đề tương tự
  1. Thúy Viết Bài
    Trả lời:
    0
    Xem:
    367
  2. Thúy Viết Bài
    Trả lời:
    0
    Xem:
    383