Package org.eclipse.ecf.springframework.identity

Source Code of org.eclipse.ecf.springframework.identity.LongIDFactoryBean

/*******************************************************************************
* Copyright (c) 2010 Angelo Zerr and others. All rights reserved. This
* program and the accompanying materials are made available under the terms of
* the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
*   Angelo ZERR <angelo.zerr@gmail.com>. - initial API and implementation
******************************************************************************/
package org.eclipse.ecf.springframework.identity;

import org.eclipse.ecf.core.identity.ID;
import org.eclipse.ecf.core.identity.IIDFactory;
import org.springframework.beans.factory.FactoryBean;

/**
* {@link FactoryBean} that creates ECF identity {@link ID} with Long ID by
* using {@link IIDFactory#createLongID(long)}.
*
*/
public class LongIDFactoryBean extends AbstractIDFactoryBean {

  private long longID;

  public void setLongID(long longID) {
    this.longID = longID;
  }

  protected ID createIdentity() {
    IIDFactory idFactory = getIdFactory();
    return idFactory.createLongID(longID);
  }

}
TOP

Related Classes of org.eclipse.ecf.springframework.identity.LongIDFactoryBean

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.