package com.sunxung.factoring.entity;

import com.sunxung.factoring.component.util.StringUtil;

/**
 * 拼音实体基类
 */
public abstract class PinYinEntity extends BaseEntity {

    private static final long serialVersionUID = 1L;
    /** 简拼 */
    private String simplePinYin;
    /** 全拼 */
    private String fullPinYin;

    public abstract String getName();

    public String getSimplePinYin() {
        return simplePinYin;
    }

    public void setSimplePinYin(String simplePinYin) {
        if (StringUtil.isNotEmpty(simplePinYin) && simplePinYin.length() > 25) {
            simplePinYin = simplePinYin.substring(0, 25);
        }
        this.simplePinYin = simplePinYin;
    }

    public String getFullPinYin() {
        return fullPinYin;
    }

    public void setFullPinYin(String fullPinYin) {
        if (StringUtil.isNotEmpty(fullPinYin) && fullPinYin.length() > 45) {
            fullPinYin = fullPinYin.substring(0, 45);
        }
        this.fullPinYin = fullPinYin;
    }
}
