001package votorola.a.diff.harvest.cache;// Copyright 2010-2012. Christian Weilbach.  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Votorola Software"), to deal in the Votorola Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicence, and/or sell copies of the Votorola Software, and to permit persons to whom the Votorola Software is furnished to do so, subject to the following conditions: The preceding copyright notice and this permission notice shall be included in all copies or substantial portions of the Votorola Software. THE VOTOROLA SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE VOTOROLA SOFTWARE OR THE USE OR OTHER DEALINGS IN THE VOTOROLA SOFTWARE.
002
003/**
004 * This class contains a derived Message object, which
005 * contains all the original message data and additionally
006 * information to the single diffKey URL it maps to in this
007 * message. This is what is stored in the database.
008 * This is losely connected to the Bite type of Crossforum.
009 * @see DraftPair
010 * @see Cache
011 * @see Message
012 * @see HarvestTable
013 */
014
015import votorola.a.count.XCastRelation;
016
017import votorola.g.lang.ThreadSafe;
018
019/**
020 * TODO This wrapper is not used by {@link HarvestCache} at the moment because
021 * we don't have historic voting data in the database yet and therefore cannot
022 * store relational data.
023 * 
024 * Related authenticated diff-messages are the last processing stage of
025 * {@link HarvestCache} before storing this information in the database.
026 * 
027 * @see HarvestCache
028 * @see AuthDiffMessage
029 * 
030 */
031@ThreadSafe
032class RelAuthDiffMessage {
033
034    final private AuthDiffMessage admsg;
035
036    public AuthDiffMessage authDiffMessage() {
037        return admsg;
038    }
039
040    private final XCastRelation relation;
041
042    public XCastRelation relation() {
043        return relation;
044    }
045
046    RelAuthDiffMessage(final AuthDiffMessage admsg, final XCastRelation rel) {
047        this.admsg = admsg;
048        this.relation = rel;
049    }
050}