org.hibernate.annotations.Index Java Examples

The following examples show how to use org.hibernate.annotations.Index. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TableBinder.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
public static void addIndexes(Table hibTable, Index[] indexes, MetadataBuildingContext buildingContext) {
	for (Index index : indexes) {
		//no need to handle inSecondPass here since it is only called from EntityBinder
		buildingContext.getMetadataCollector().addSecondPass(
				new IndexOrUniqueKeySecondPass( hibTable, index.name(), index.columnNames(), buildingContext )
		);
	}
}
 
Example #2
Source File: TableBinder.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
public static List<JPAIndexHolder> buildJpaIndexHolder(javax.persistence.Index[] indexes){
	List<JPAIndexHolder> holders = new ArrayList<JPAIndexHolder>( indexes.length );
	for(javax.persistence.Index index : indexes){
		holders.add( new JPAIndexHolder( index ) );
	}
	return holders;
}
 
Example #3
Source File: User.java    From java-course-ee with MIT License 5 votes vote down vote up
/**
 * Returns the username associated with this user account;
 *
 * @return the username associated with this user account;
 */
@Basic(optional = false)
@Column(length = 100)
@Index(name = "idx_users_username")
public String getUsername() {
    return username;
}
 
Example #4
Source File: Log.java    From ankush with GNU Lesser General Public License v3.0 4 votes vote down vote up
/**
 * Gets the host.
 * 
 * @return the host
 */
@JsonIgnore
@Index(name = "log_host_index")
public String getHost() {
	return host;
}
 
Example #5
Source File: TableBinder.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
public void setJpaIndex(javax.persistence.Index[] jpaIndex){
	this.jpaIndexHolders = buildJpaIndexHolder( jpaIndex );
}
 
Example #6
Source File: HAService.java    From ankush with GNU Lesser General Public License v3.0 4 votes vote down vote up
/**
 * @return the service
 */
@Index(name = "haservice_service_index")
public String getService() {
	return service;
}
 
Example #7
Source File: HAService.java    From ankush with GNU Lesser General Public License v3.0 4 votes vote down vote up
/**
 * @return the component
 */
@Index(name = "haservice_component_index")
public String getComponent() {
	return component;
}
 
Example #8
Source File: HAService.java    From ankush with GNU Lesser General Public License v3.0 4 votes vote down vote up
/**
 * @return the clusterId
 */
@Index(name = "haservice_cluster_index")
public Long getClusterId() {
	return clusterId;
}
 
Example #9
Source File: Event.java    From ankush with GNU Lesser General Public License v3.0 4 votes vote down vote up
/**
 * @return the category
 */
@Index(name = "event_category_index")
public String getCategory() {
	return category;
}
 
Example #10
Source File: Event.java    From ankush with GNU Lesser General Public License v3.0 4 votes vote down vote up
/**
 * Gets the cluster id.
 * 
 * @return the clusterId
 */
@JsonIgnore
@Index(name = "event_cluster_index")
public Long getClusterId() {
	return clusterId;
}
 
Example #11
Source File: Service.java    From ankush with GNU Lesser General Public License v3.0 4 votes vote down vote up
/**
 * @return the service
 */
@Index(name = "service_service_index")
public String getService() {
	return service;
}
 
Example #12
Source File: Service.java    From ankush with GNU Lesser General Public License v3.0 4 votes vote down vote up
/**
 * @return the component
 */
@Index(name = "service_component_index")
public String getComponent() {
	return component;
}
 
Example #13
Source File: Service.java    From ankush with GNU Lesser General Public License v3.0 4 votes vote down vote up
/**
 * @return the node
 */
@Index(name = "service_node_index")
public String getNode() {
	return node;
}
 
Example #14
Source File: Service.java    From ankush with GNU Lesser General Public License v3.0 4 votes vote down vote up
/**
 * @return the clusterId
 */
@JsonIgnore
@Index(name = "service_cluster_index")
public Long getClusterId() {
	return clusterId;
}
 
Example #15
Source File: Role.java    From java-course-ee with MIT License 4 votes vote down vote up
@Basic(optional = false)
@Column(length = 100)
@Index(name = "idx_roles_name")
public String getName() {
    return name;
}
 
Example #16
Source File: User.java    From java-course-ee with MIT License 4 votes vote down vote up
@Basic(optional = false)
@Index(name = "idx_users_email")
public String getEmail() {
    return email;
}
 
Example #17
Source File: Ejb3Column.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
public void addIndex(Index index, boolean inSecondPass) {
	if ( index == null ) return;
	String indexName = index.name();
	addIndex( indexName, inSecondPass );
}
 
Example #18
Source File: TableBinder.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
public static void addIndexes(Table hibTable, javax.persistence.Index[] indexes, MetadataBuildingContext buildingContext) {
	buildingContext.getMetadataCollector().addJpaIndexHolders( hibTable, buildJpaIndexHolder( indexes ) );
}
 
Example #19
Source File: Event.java    From ankush with GNU Lesser General Public License v3.0 2 votes vote down vote up
/**
 * Gets the name.
 * 
 * @return the name
 */
@Index(name = "event_name_index")
public String getName() {
	return name;
}
 
Example #20
Source File: Event.java    From ankush with GNU Lesser General Public License v3.0 2 votes vote down vote up
/**
 * Gets the type.
 * 
 * @return the type
 */
@Index(name = "event_type_index")
public Type getType() {
	return type;
}
 
Example #21
Source File: Event.java    From ankush with GNU Lesser General Public License v3.0 2 votes vote down vote up
/**
 * Gets the severity.
 * 
 * @return the severity
 */
@Index(name = "event_severity_index")
public Severity getSeverity() {
	return severity;
}
 
Example #22
Source File: Event.java    From ankush with GNU Lesser General Public License v3.0 2 votes vote down vote up
/**
 * Gets the host.
 * 
 * @return the host
 */
@Index(name = "event_host_index")
public String getHost() {
	return host;
}
 
Example #23
Source File: Node.java    From ankush with GNU Lesser General Public License v3.0 2 votes vote down vote up
/**
 * Gets the public ip.
 * 
 * @return the publicIp
 */
@Index(name = "node_publicip_index")
public String getPublicIp() {
	return publicIp;
}