code: public static PlainChangesLog getInstance(PlainChangesLog originalLog)
     {
        if (originalLog.getSession() != null)
        {
           return new FastAddPlainChangesLog(originalLog.getSession().getId(), originalLog.getEventType(),
              originalLog.getPairId(), originalLog.getSession());
        }
  
        return new FastAddPlainChangesLog(originalLog.getSessionId(), originalLog.getEventType(),
           originalLog.getPairId(), null);
     }
docs: Factory method.