// Generated by: hibernate/SpringHibernateDaoImpl.vsl in andromda-spring-cartridge.
// license-header java merge-point
/**
 * This is only generated once! It will never be overwritten.
 * You can (and have to!) safely modify it by hand.
 */
package org.phoenixctms.ctsms.domain;

import org.phoenixctms.ctsms.vo.IcdSystModifierVO;

/**
 * @see IcdSystModifier
 */
public class IcdSystModifierDaoImpl
		extends IcdSystModifierDaoBase {

	/**
	 * @inheritDoc
	 */
	@Override
	public IcdSystModifier icdSystModifierVOToEntity(IcdSystModifierVO icdSystModifierVO) {
		IcdSystModifier entity = this.loadIcdSystModifierFromIcdSystModifierVO(icdSystModifierVO);
		this.icdSystModifierVOToEntity(icdSystModifierVO, entity, true);
		return entity;
	}

	/**
	 * @inheritDoc
	 */
	@Override
	public void icdSystModifierVOToEntity(
			IcdSystModifierVO source,
			IcdSystModifier target,
			boolean copyIfNull) {
		super.icdSystModifierVOToEntity(source, target, copyIfNull);
	}

	/**
	 * Retrieves the entity object that is associated with the specified value object
	 * from the object store. If no such entity object exists in the object store,
	 * a new, blank entity is created
	 */
	private IcdSystModifier loadIcdSystModifierFromIcdSystModifierVO(IcdSystModifierVO icdSystModifierVO) {
		Long id = icdSystModifierVO.getId();
		IcdSystModifier icdSystModifier = null;
		if (id != null) {
			icdSystModifier = this.load(id);
		}
		if (icdSystModifier == null) {
			icdSystModifier = IcdSystModifier.Factory.newInstance();
		}
		return icdSystModifier;
	}

	/**
	 * @inheritDoc
	 */
	@Override
	public IcdSystModifierVO toIcdSystModifierVO(final IcdSystModifier entity) {
		return super.toIcdSystModifierVO(entity);
	}

	/**
	 * @inheritDoc
	 */
	@Override
	public void toIcdSystModifierVO(
			IcdSystModifier source,
			IcdSystModifierVO target) {
		super.toIcdSystModifierVO(source, target);
	}
}