/**
 * Licensed under the MICE s.r.l.
 * End User License Agreement
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.micegroup.it/voila/license.html
 */
package it.mice.voila.runtime.displaytag.basedec;

import it.mice.voila.runtime.entity.CoreEntity;

/**
 * @author ZZY9V4
 *
 *         To change this generated comment edit the template variable "typecomment":
 *         Window &gt;Preferences &gt;Java &gt;Templates.
 *         To enable and disable the creation of type comments go to
 *         Window &gt;Preferences &gt;Java &gt;Code Generation.
 */
public class SelectRowBaseDec extends AbstractSelectRowDec {

    public Object getRowId(Object currentElement) {
        try {
            CoreEntity currentEntity = (CoreEntity) currentElement;
            return currentEntity.getObjectKey();
        } catch (Exception e) {
            e.printStackTrace();
            return new Integer(currentElement.hashCode());
        }
    }
}
