private void setMusic_lang(Map<String, Object> inUpdateMap, Lang inValue) { final long theUpdateValue = inValue.getId().longValue(); if (theUpdateValue != this.music_lang) { this.music_lang = theUpdateValue; inUpdateMap.put("music_lang", theUpdateValue); } }
/** * Creates a Lang object using id1's ID and id2's pattern * * @param id1 * @param id2 * @return */ public static Lang getLang(String id1, String id2) { Lang lang1 = getLang(id1); if (lang1 == null) return null; Lang lang2 = getLang(id2); if (lang2 == null) return null; Lang lang = new Lang(); lang.setName(lang1.getName() + " + " + lang2.getName()); lang.setId(lang1.getId()); // web page retrieval langId lang.setPattern(lang2.getPattern()); // text extraction langId return lang; }
public MusicImpl( Files inFileId, User inOwner, Lang lang, String name, int styleid, int share, int inMusicType) throws SQLException { this.music_name = name; this.file_id = inFileId.getId(); if (inOwner != null) { this.music_owner = inOwner.getId().intValue(); if (lang == null) { final Annu theAnnu = inOwner.getAnnu(); if (theAnnu != null) { final Lang theUserLang = theAnnu.getLangPreferences(); if (theUserLang != null) { this.music_lang = ObjectLangData.getDefaultObjectLanguage(theUserLang.getIsoCode()).getId(); } } } } else { this.music_owner = 0; } this.music_styleid = styleid; this.music_share = share; if (lang != null) { this.music_lang = lang.getId().longValue(); } this.music_type = inMusicType; init(MusicImpl.NEW_COLUMNS); this.mFile = new SingleAssociationNotNull<Music, Files, FilesImpl>( this, StringShop.FILE_ID, FilesImpl.SPECIFICATION); this.mOwner = new SingleAssociationNotNull<Music, User, UserImpl>( this, "music_owner", UserImpl.SPECIFICATION); }
public static Lang getLang(String id) { if (id == null) return null; for (Lang lang : langList) if (lang.getId().equals(id)) return lang; return null; }