/** * MailArchiver is an application that provides services for storing and managing e-mail messages through a Web Services SOAP interface. * Copyright (C) 2012 Marcio Andre Scholl Levien and Fernando Alberto Reuter Wendt and Jose Ronaldo Nogueira Fonseca Junior * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ /******************************************************************************\ * * This product was developed by * * SERVIÇO FEDERAL DE PROCESSAMENTO DE DADOS (SERPRO), * * a government company established under Brazilian law (5.615/70), * at Department of Development of Porto Alegre. * \******************************************************************************/ package serpro.mailarchiver.domain.metaarchive; import javax.jdo.JDOHelper; import javax.jdo.annotations.NotPersistent; import javax.jdo.annotations.PersistenceCapable; import serpro.mailarchiver.util.Logger; @PersistenceCapable public class MailboxField_Mailbox extends FieldAddress implements Mailbox { @NotPersistent private static final Logger log = Logger.getLocalLogger(); @Override public final String getLocalPart() { return localPart; } @Override public final void setLocalPart(String localPart) { this.localPart = localPart; } @Override public final String getDomain() { return domain; } @Override public final void setDomain(String domain) { this.domain = domain; } @Override public final String getRoute() { return route; } @Override public final void setRoute(String route) { this.route = route; } //---------------------------------------------------------------------- @Override public final MailboxField getField() { return (MailboxField)field; } public final void setField(MailboxField field) { if(this.field != null) { getField().internal_setMailbox(null); } this.field = field; if(this.field != null) { getField().internal_setMailbox(this); } } final void internal_setField(MailboxField field) { this.field = field; } //---------------------------------------------------------------------- @Override final void dumpTree(StringBuilder sb, String pad) { sb.append(toString(pad + " ")); } @Override final String toString(String pad) { return String.format( "MailboxField_Mailbox%n" + "%1$sjdoState: %2$s%n" + "%1$soid: %3$s%n" + "%1$shash: %4$x%n" + "%1$sname: %5$s%n" + "%1$slocalPart: %6$s%n" + "%1$sdomain: %7$s%n" + "%1$sroute: %8$s" , pad , JDOHelper.getObjectState(this) , getOid() , hashCode() , getName() , getLocalPart() , getDomain() , getRoute()); } }