Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Hibernate OGM, Domain model persistence for NoSQL datastores
   *
   * License: GNU Lesser General Public License (LGPL), version 2.1 or later
   * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
   */
  package org.hibernate.ogm.model.key.spi;
  
Stores metadata information common to all keys related to a given association

Author(s):
Emmanuel Bernard <emmanuel@hibernate.org>
 
 public interface AssociationKeyMetadata {

Returns the table name of this key.

Returns:
the table name of this key
 
The columns identifying the association. For example, in a many to many association, the row key will look like:
 RowKey{table='AccountOwner_BankAccount', columnNames=[owners_id, bankAccounts_id], columnValues=[...]},
 
the association key will be something like:
 AssociationKey{table='AccountOwner_BankAccount', columnNames=[owners_id], columnValues=[...]},
 

Returns:
the columns names as an array, it never returns null
 
The columns identifying an element of the association

Returns:
the column names identifying an element of the association
 
The columns representing the index of the element of the association.

For example, the key columns of a map-type property or the column with the order if the property is annotated with javax.persistence.OrderColumn

Returns:
the columns names representing the index of the element of the association
 
Returns meta-data about the entity key referenced by associations of this key family.

Returns:
meta-data about the entity key referenced by associations of this key family.
 
Returns all those columns from the given candidate list which are not part of this key family.

Stores can opt to persist only the returned columns when writing a row of this key family. All other columns can be retrieved from the key meta-data itself when reading an association row.

Parameters:
candidates the column to check
Returns:
all the columns that are not part of this key family
 
Returns the name of the single row key column which is not a column of this key itself, in case such a column exists.

If e.g. an association key contains the column "bankAccounts_id" and the row key columns are "bankAccounts_id" and "owners_id", this method will return "owners_id". But if the row columns were "bankAccounts_id", "owners_id" and "order", null would be returned as there were more than one column which are not part of the association key.

Returns:
the name of the single row key column which is not a column of this key itself or null if there is either no or more than one such column.
 
Whether the given column is part of this key family or not.

Parameters:
columnName the name of the column to check
Returns:
true if the given column is part of this key, false otherwise.
 
	boolean isKeyColumn(String columnName);

Whether this key meta-data represents the inverse side of a bi-directional association.

Returns:
true if this key meta-data represents the inverse side of a bi-directional association, false otherwise.
	boolean isInverse();

Get the association role.

Returns:
the association role
Get the type of association

Returns:
the association kind
Check if the key identify a one-to-one association

Returns:
true if the association is one-to-one, false otherwise
	boolean isOneToOne();
New to GrepCode? Check out our FAQ X