001// 002// Name 003// $RCSfile: KeyManager.java,v $ 004// 005// Copyright 006// Confidential Property of Kabira Technologies, Inc. 007// Copyright 2009, 2010 by Kabira Technologies, Inc. 008// All rights reserved. 009// 010// History 011// $Revision: 1.1.2.2 $ $Date: 2010/05/11 23:50:48 $ 012// 013package com.kabira.platform; 014 015/** 016 * Factory for KeyQuery instances. 017 */ 018public class KeyManager<T> 019{ 020 /** 021 * Creates a KeyManager instance. 022 */ 023 public KeyManager() { } 024 025 /** 026 * Returns a new instance of a KeyQuery class. 027 * 028 * @param klass Class containing the key. 029 * @param keyName Name defining the key. 030 * 031 * @exception KeyUnknownKeyNameError 032 * The given keyName is not defined for the type. 033 */ 034 public KeyQuery<T> createKeyQuery( 035 final Class<T> klass, 036 final String keyName) 037 throws KeyUnknownKeyNameError 038 { 039 return new KeyQuery<T>(klass, keyName); 040 } 041}