settings.xml
<servers>
<server>
<id></id>
<username></username>
<password></password>
</server>
</servers>
このsettings.xmlのサーバーIDはpom.xmlのtomcat-maven-pluginのサーバー情報と紐付いてる。
<!--connection pool-->
<property name="hibernate.dbcp.maxActive">10</property>
<property name="hibernate.dbcp.whenExhaustedAction">1</property>
<property name="hibernate.dbcp.maxWait">20000</property>
<property name="hibernate.dbcp.maxIdle">10</property>
<!-- prepared statement cache-->
<property name="hibernate.dbcp.ps.maxActive">10</property>
<property name="hibernate.dbcp.ps.whenExhaustedAction">1</property>
<property name="hibernate.dbcp.ps.maxWait">20000</property>
<property name="hibernate.dbcp.ps.maxIdle">10</property>
<!-- optional query to validate pooled connections:-->
<property name="hibernate.dbcp.validationQuery">select 1</property>
<property name="hibernate.dbcp.testOnBorrow">true</property>
<property name="hibernate.dbcp.testOnReturn">true</property>
<role rolename="admin"/>
<role rolename="admin-gui"/>
<role rolename="manager"/>
<role rolename="manager-gui"/>
// in the first session Cat cat = (Cat) firstSession.load(Cat.class, catID); // in a higher tier of the application Cat mate = new Cat(); cat.setMate(mate); // later, in a new session secondSession.saveOrUpdate(cat); // update existing state (cat has a non-null id) secondSession.saveOrUpdate(mate); // save the new instance (mate has a null id)
<div class="comment" data-value="64">
var value = $('[div selector]').data('value');
string | sEcho | An unaltered copy of sEcho sent from the client side. This parameter will change with each draw (it is basically a draw count) - so it is important that this is implemented. Note that it strongly recommended for security reasons that you 'cast' this parameter to an integer in order to prevent Cross Site Scripting (XSS) attacks. |
@OneToMany(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST,CascadeType.MERGE }, mappedBy = "stock")
@OneToMany(fetch = FetchType.LAZY, mappedBy = "stock") @Cascade({CascadeType.SAVE_UPDATE})
The order column must be of integral type. The persistence provider maintains a contiguous (non-sparse) ordering of the values of the order column when updating the association or element collection. The order column value for the first element is 0.※contiguous=切れ目の無い
public class University {
private String id;
private String name;
private String address;
private List<Student> students;
// setters and getters
}
ID | PROJ_TYPE | NAME | BUDGET |
1 | L | Accounting | 50000 |
2 | S | Legal | null |
@Entity @Inheritance @DiscriminatorColumn(name="PROJ_TYPE") @Table(name="PROJECT") public abstract class Project { @Id private long id; ... }
@Entity @DiscriminatorValue("L") public class LargeProject extends Project { private BigDecimal budget; }
@Entity @DiscriminatorValue("S") public class SmallProject extends Project { }
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
| <table id= "table_id" > <thead> <tr> <th>Column 1</th> <th>Column 2</th> </tr> </thead> <tbody> <tr> <td>Row 1 Data 1</td> <td>Row 1 Data 2</td> </tr> <tr> <td>Row 2 Data 1</td> <td>Row 2 Data 2</td> </tr> </tbody> </table> |